Created
January 3, 2023 12:36
-
-
Save EeeasyCode/64bf18ac9abecf48ce517579e6730196 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 기본적인 집합 초기화 | |
S = set() | |
# 원소를 추가 | |
S.add(i) | |
# 집합을 공집합으로 만들 경우 | |
S.clear() | |
# remove 메소드도 있지만, 집합에 없는 수를 제거하려고 할 때, remove는 오류를 발생시키므로 | |
# discard()를 사용 | |
S.discard(k) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment