Recent Posts

두 컴퓨터와 기록을 주고받는 노트

Python Tutorial / Read and Write Text Files with with and Encodings

Select text-file modes and encodings, manage file lifetime with with and protect existing data while handling path, permission and decoding errors.

여러 하위 폴더와 파일로 이어지는 경로 구조

Python Tutorial / Manage File and Folder Paths with pathlib

Build paths with pathlib, distinguish working directories from script locations and inspect files without assuming existence checks guarantee safe access.

상하위 폴더가 연결된 패키지 구조

Python Tutorial / Organize Packages and Define a Safe Entry Point

Create a regular package, run it with python -m and verify that importing its entry module does not accidentally start the application.

서로 연결하고 분리할 수 있는 모듈 블록

Python Tutorial / Create Modules and Split Code with import

Split a Python application into reusable modules, understand import lookup and initialization, and avoid shadowing, side effects and circular dependencies.

공유와 독립 복사를 비교하는 데이터 용기

Python Tutorial / Understand Variable Scope, Aliasing and Mutable Objects

Separate scope, rebinding and mutation; compare aliases with shallow copies and define whether functions preserve or modify their inputs.

여러 항목을 묶었다가 펼쳐 담는 주머니와 상자

Python Tutorial / Collect and Unpack Arguments with *args and **kwargs

Read star syntax in definitions and calls, collect flexible arguments and avoid duplicate keywords, accidental string expansion and unchecked option forwarding.

입력 조절 장치가 연결된 함수 처리 장치

Python Tutorial / Use Positional Arguments, Keywords and Defaults

Write readable positional and keyword calls, use keyword-only options and prevent shared mutable defaults while documenting intentional input mutation.

입력을 받아 처리한 결과를 내는 재사용 장치

Python Tutorial / Define Functions and Return Values

Define functions with clear parameters and return contracts, separate computation from printing and test call order, arguments and missing return values.

여러 기록을 모아 하나의 합계를 만드는 흐름

Python Tutorial / Practice Conditions and Loops with a Score Summary

Combine validation, branching and iteration in a complete score-summary program, with visible rejected counts and explicit empty-input and boundary checks.

여러 도형을 선별해 새 모음으로 만드는 장치

Python Tutorial / Build List, Dictionary and Set Comprehensions

Distinguish filters from conditional expressions, build list/dictionary/set comprehensions and preserve the correct meaning of duplicates and empty results.