이 컬렉션은 파이썬을 이미 어느 정도 아는 개발자가 필요할 때 빠르게 꺼내 쓸 수 있도록 핵심 패턴과 함정을 정리한 치트시트입니다. 처음 배우는 분보다는 “예전에 했는데 문법이 기억 안 날 때” 참고하기 좋습니다.
이 컬렉션을 어떻게 쓰면 좋을까?
이 컬렉션은 “처음부터 끝까지 정독"보다는 필요할 때 빠르게 찾아 쓰는 용도에 맞춘 파이썬 치트시트입니다.
각 페이지는 핵심만 요약하고, 더 자세한 내용은 공식 문서로 이어지도록 구성합니다.
커리큘럼 (총 68개 챕터)
Section 1: 기초 문법
- 01. Basic - 연산자, 변수, 출력, 형변환
- 02. 내장 함수들
- 03. Strings - 슬라이싱/포맷팅/검색/치환
- 04. Collections - list/tuple/set 패턴
- 05. dict 패턴 - 조회/기본값/카운팅/병합
- 06. Control Flow - if/for/while 패턴
- 07. Functions - 인자/리턴/*args/**kwargs
- 08. OOP & Classes - 클래스/상속/프로퍼티
- 09. Decorators - 함수/클래스 데코레이터
- 10. Comprehensions & Generators
- 11. Errors & Exceptions - try/raise 패턴
- 12. Context Managers - with문/리소스 관리
Section 2: 파일/모듈/환경
- 13. Files - pathlib/encoding/open 패턴
- 14. Modules & Imports - 구조/엔트리포인트
- 15. venv & pip - 환경/의존성 기본
- 16. Environment Variables - os.environ/dotenv
- 17. argparse & CLI - 커맨드라인 인자 처리
- 18. subprocess - 외부 프로세스 실행
Section 3: 타입/데이터 모델링
- 19. Typing - 실전 타입힌트 패턴
- 20. dataclasses - default_factory/frozen 패턴
- 21. Enum & Flag - 열거형 실전 패턴
- 22. copy - 얕은/깊은 복사 패턴
- 23. match-case - 구조적 패턴 매칭 (Py3.10+)
- 24. ABC - 추상 클래스 정의 패턴
- 25. Metaclass - 클래스를 만드는 클래스
- 26. Descriptor - 속성 접근 제어 프로토콜
- 27. inspect - 런타임 객체 검사
Section 4: 함수형/이터레이터/유틸리티
- 28. itertools & functools - 자주 쓰는 조합
- 29. operator - 연산자 함수와 효율적 접근자
- 30. collections 심화 - deque/namedtuple/ChainMap
- 31. heapq & bisect - 우선순위 큐/이진 검색
- 32. contextlib 심화 - suppress, redirect, ExitStack
- 33. textwrap - 텍스트 정렬과 줄바꿈
- 34. pprint & reprlib - 예쁜 출력과 요약
Section 5: 데이터 처리
- 35. JSON & CSV - 읽기/쓰기/인코딩
- 36. XML - ElementTree로 XML 파싱/생성
- 37. datetime - timezone/파싱/포맷
- 38. zoneinfo - 표준 시간대 (Python 3.9+)
- 39. Regex - 안전하게 쓰는 최소 패턴
- 40. urllib.parse - URL 파싱과 조립
- 41. configparser & tomllib - INI/TOML 설정 파일
- 42. pickle - 객체 직렬화 (보안 주의)
- 43. struct & bytes - 바이너리 데이터 처리
- 44. Database - sqlite3/ORM 기본 패턴
- 45. weakref - 약한 참조와 메모리 관리
Section 6: 수학/보안
- 46. math & statistics - 수학/통계 함수
- 47. decimal & fractions - 정밀 수치 연산
- 48. random - 난수 생성과 무작위 선택
- 49. uuid - 고유 식별자 생성
- 50. hashlib & secrets - 해시/보안 난수
Section 7: 시스템/파일
- 51. os 심화 - 파일시스템과 프로세스
- 52. sys 심화 - 인터프리터와 런타임 정보
- 53. shutil & tempfile - 파일 복사/이동/임시파일
- 54. zipfile & tarfile - 압축 파일 처리
- 55. signal - 시그널 처리
- 56. atexit - 프로그램 종료 시 정리
Section 8: 디버깅/테스팅/성능
- 57. Logging & Debugging - traceback 읽기
- 58. pdb 심화 - 대화형 디버깅
- 59. Testing - unittest/pytest 관점
- 60. unittest.mock - 모킹과 패칭
- 61. Profiling - cProfile/py-spy 성능 분석
Section 9: 패키징
Section 10: 비동기/네트워크
- 63. asyncio - 비동기 최소 패턴
- 64. Concurrency - threading/multiprocessing 선택
- 65. HTTP Requests - urllib/requests 기본
- 66. http.server - 간단한 HTTP 서버
- 67. socket - 소켓 프로그래밍 최소 패턴
- 68. email & smtplib - 이메일 작성/발송
![Featured image of post [Python Cheatsheet] 00. Overview - 사용법/커리큘럼/로드맵](/post/python-cheatsheet/roadmap-overview-essential-guide-for-efficient-curriculum/wordcloud_hu_7ba7457b48be0ab3.png)
![[Python Cheatsheet] 00. Overview - 사용법/커리큘럼/로드맵](/post/python-cheatsheet/roadmap-overview-essential-guide-for-efficient-curriculum/wordcloud_hu_89de6aae6dbda848.png)
![[Python Cheatsheet] 08. OOP & Classes - 클래스/상속/프로퍼티](/post/python-cheatsheet/oop-classes-inheritance-property-methods-guide/wordcloud_hu_c6924a7b3b43c0fe.png)
![[Python Cheatsheet] 09. Decorators - 함수/클래스 데코레이터](/post/python-cheatsheet/guide-decorators-functions-classes-wrapper-examples-reference/wordcloud_hu_5116df45caa4e900.png)
![[Python Cheatsheet] 12. Context Managers - with문/리소스 관리](/post/python-cheatsheet/context-manager-with-resource-management-best-practices-guide/wordcloud_hu_c4127dc6ae73e7db.png)
![[Python Cheatsheet] 16. Environment Variables - os.environ/dotenv 패턴](/post/python-cheatsheet/manage-env-variables-os-environ-dotenv-envfile-configuration-guide/wordcloud_hu_a9f5d5bb7c00d9ed.png)
![[Python Cheatsheet] 01. Basic - 연산자/변수/출력/형변환](/post/python-cheatsheet/operators-variables-casting-output-input-essential-guide/wordcloud_hu_884c8fc48ef6636a.png)
![[Python Cheatsheet] 04. Collections - list/tuple/set 패턴](/post/python-cheatsheet/fast-list-tuple-set-guide-patterns-collection-copy-sort-unpack/wordcloud_hu_bd6bf3a251c6426.png)
![[Python Cheatsheet] 35. JSON & CSV - 읽기/쓰기/인코딩](/post/python-cheatsheet/read-write-json-csv-file-serialization-encoding-guide/wordcloud_hu_20e0510d5de3dbb3.png)
![[Python Cheatsheet] 19. Typing - 실전 타입힌트 패턴](/post/python-cheatsheet/practical-type-hint-patterns-static-analysis-guide-2024/wordcloud_hu_7189a50467c1b0ca.png)
![[Python Cheatsheet] 34. pprint & reprlib - 예쁜 출력과 요약](/post/python-cheatsheet/pretty-print-complex-data-dict-reprlib-formatting-guide/wordcloud_hu_4b03cacc4088dedc.png)