-
collections 모듈 - extend, appendPython/개념학습 2022. 8. 21. 12:04
in collections.deque
# 예제3-2. append() vs extend() lst2 = ['a', 'b', 'c', 'd'] lst.extend('ef') # extend() lst2.append('ef') # append() print("lst.extend('ef') >> ", lst) print("lst2.append('ef') >>", lst2) ''' 결과 lst.extend('ef') >> ['a', 'b', 'c', 'd', 'e', 'f'] lst2.append('ef') >> ['a', 'b', 'c', 'd', 'ef']
reference: https://excelsior-cjh.tistory.com/entry/collections-모듈-deque [EXCELSIOR:티스토리]
'Python > 개념학습' 카테고리의 다른 글
map함수 활용 (0) 2022.10.27 Meaning of stack[-1][0] (0) 2022.08.24 Day05 더 빠르게 입력받기 : sys.stdin.readline() (0) 2022.08.13 Day04 아스키코드<->문자열 변환 함수 : ord - chr (0) 2022.08.10 Day03 (0) 2022.07.30