[Python] 병행성(Concurrency)(1) - basic
iterable 객체 - 반복 가능한 객체iterator 객체 - 값을 차례대로 꺼낼 수 있는 객체 iterable 객체 # 반복 가능한 이유? -> 내부적으로 iter() 함수 호출t = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'# for 반복for c in t: print(c, end=' ') --------------------------------------------[result]A B C D E F G H I J K L M N O P Q R S T U V W X Y Z iterator 객체 a=t.__iter__()print([next(a) for _ in range(len(t))])# ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', ..
[Python] 고급 - 리스트 및 튜플(1) - Sequence(1)
컨테이너 타입 자료형(Container : 서로다른 자료형[list, tuple, collections.deque], a = [3, 3.5, 'a'] # 서로 다른 자료형, 컨네이너 타입 자료형 Flat : 한 개의 자료형[str, bytes, bytearray, array.array, memoryview])한개의 자료형만 저장, 빠름, 자연어 처리, 숫자, 이산, 회계분석, 기상데이터 등 단일 형태의 연산 가변(list, bytearray, array.array, memoryview, deque)불변(tuple, str, bytes) # 지능형 리스트(Comprehending Lists)# Non Comprehending Listschars = '+_)(*&^%$#@!~)'code_list1 = []f..