my_set = {1, 2, 3, 3, 3} print(my_set) # {1, 2, 3} 1. set([]) : list를 set로 바꿈 2. set1 & set2 : 교집합 확인 2-1 : set1.intersection(set2) : 교집합 3. 합집합 1) | 2) set1.union(set2) 4. 집합에 추가 2) set.add()
1. Dictionary 내장함수 cabinet = {name:"거북고래", age:250} print(cabinet.get(name)) # 거북고래 print(name in cabinet) # True print(address in cabinet) # False cabinet["address"] = "하늘" p
num_list = [1, 2, 3, 4, 5] num_list.append(6) num_list.
최근댓글