list2 Python ) Built-in Data Structure 파이썬 내장 데이터 구조 4가지 (Built-in 4 Data Structures)리스트 (List)기호: []가변성 (Mutable): 값 변경 가능인덱스 접근 가능 (Subscriptable): 인덱스 번호로 접근 가능중복 가능 (Not Unique)특징: .append() 메서드로 인해 메모리를 여유 있게 할당해 두어야 하므로(메모리 2개), 튜플보다 생성 속도가 느림lst = [1, 2, 3]lst.append(4) print(lst) # [1, 2, 3, 4] 딕셔너리 (Dictionary)기호: {} (Key: Value 쌍)가변성 (Mutable): 값 변경 가능인덱스 접근 가능 (Subscriptable): Key를 통해 접근순서 보장: 파이썬 3.7 버전부터 삽입 순서가 유지됨고유성 (U.. 2026. 1. 12. 260107 TIL : List, For Loop and Function 기억에 남는 것random 모듈 docs : https://docs.python.org/3/library/random.htmlrandom.shuffle(x) : 연속인 수들을 섞음random.randint(a, b) : 랜덤한 값을 N 이라고 치면 N 의 범위 ⇒ a ≤ N ≤ b string.join(x)- string. : join은 string 즉, 문자열에 대한 함수임- x : 리스트 자료구조이어야 함https://docs.python.org/ko/3.13/tutorial/datastructures.htmlPython 내장 함수https://docs.python.org/3/library/functions.htmlList그룹화순서# 정의countries = ['Korea', 'Japan', 'Chi.. 2026. 1. 7. 이전 1 다음