Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jennyonjourney/39848d5c9093d8944cc129536d476d7f to your computer and use it in GitHub Desktop.
Save jennyonjourney/39848d5c9093d8944cc129536d476d7f to your computer and use it in GitHub Desktop.
Python - 집합자료형
list1 = [11,33,22,77,11,33,77,22,11,66]
s1 = set(list1)
s2 = set((234,567,890,987,234,11,890))
print(list1)
print(s1)
print(s2)
s2.add(22)
s2.update([4455,6677,1122,7788])
print(s2)
s2.remove(6677)
print(s2)
print('------s2다나와라오바-------')
for i in s2:
print(i)
print('------s2길이나와라오바------')
print(len(s2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment