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.