1️⃣ 자료구조 개요 (Data Structure Overview)

구분 설명
자료구조(Data Structure) 데이터를 구성·저장·관리하는 구조
파이썬의 주요 자료구조 문자열(str), 리스트(list), 튜플(tuple), 딕셔너리(dict), 집합(set)
용도 데이터를 효율적으로 저장, 검색, 수정, 관리하기 위함

2️⃣ 문자열 (String)

🔹 문자열의 구조

a = '''Hello
Python'''


🔹 인덱싱(Indexing)

word = 'Python'
print(word[0])   # 'P'
print(word[-1])  # 'n'


🔹 슬라이싱(Slicing)

word = 'Python'
print(word[0:2])   # 'Py'
print(word[2:])    # 'thon'
print(word[-2:])   # 'on'

📘 형식: 문자열[start:stop:step]