Replies: 2 comments 4 replies
-
|
이렇게 쓰시면 파이썬 코드 입력하실 수 있습니다~ |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
파이썬 유저분이 한분 늘었다니 신나네요! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
https://www.acmicpc.net/problem/1157
set 함수와 count 함수를 배웠다.
set 함수는 리스트 속 중복된 요소를 제거하여 새로운 리스트를 반환한다.
예를 들어,
li = ['a', 'b', 'c', 'a', 'a'] print(set(li))위의 결과값은
{'a', 'c', 'b'}가 된다.
count 함수는 리스트 속 특정 요소가 몇 개 들어있는지 알려준다.
예를 들어,
li = ['a', 'b', 'c', 'a', 'a'] a = li.count('a') print(a)count 함수를 사용할 땐 인덱스가 아닌 특정 요소를 입력해야한다.
Beta Was this translation helpful? Give feedback.
All reactions