setPublished onesixx on 16-06-1216-06-12 https://codingwanee.tistory.com 순서(인덱싱), 중복이 없다. Python mySet = set("Hello") # 중복불가라 l은 없어짐. # {'H', 'e', 'l', 'o'} s1 = set('123') s2 = set('345345') # 합집합 s1|s2 s1.union(s2) # {'1', '2', '3', '4', '5'} # 교집합 s1&s2 s1.intersection(s2) # {'3'} # 차집합 s1-s2 s1.difference(s2) # {'1', '2'} 인덱싱이 필요하면 list / tuple로 형변환 Categories: Python Basic onesixx Blog Owner Label {} [+] Name* Email Δ Label {} [+] Name* Email Δ 0 Comments Inline Feedbacks View all comments