Posts
Python Basics: Time Zones and Clock Changes with zoneinfo
A meeting can fall on different dates in Tokyo and New York. A clock change can even make a local time occur twice. Python’s standard-library zoneinfo module supplies named time …
October 13, 2026
Python Basics: Replacing Dependencies with unittest.mock
A test should be able to check a retry without waiting for a real timeout. Python’s standard-library unittest.mock module lets you control a dependency’s responses and inspect how …
October 13, 2026
Python Basics: Ordering Dependent Tasks with graphlib
A report needs data before it can be rendered, and rendering must finish before publication. Python’s standard-library graphlib module can put tasks in an order that respects these …
October 13, 2026
Python Basics: Keeping Numeric Samples in an array
A series of measurements often contains one kind of number. Python’s standard-library array module stores these values in a compact numeric sequence. It is useful when you want …
October 13, 2026
Python Basics: Describing Data with Type Hints
Type hints describe the values a function expects and returns. They help readers and development tools follow your code. Python itself does not enforce those hints when the program …
October 13, 2026
Python Basics: Measuring Small Operations with timeit
Before replacing readable code with a faster-looking alternative, measure a small, representative operation. Python’s standard-library timeit module helps you repeat that operation …
October 13, 2026
Python Basics: Making Random Choices with random
A practice game might need dice rolls, a selection of exercises, or a shuffled question list. Python’s standard-library random module can supply these choices. Before you start …
October 13, 2026
Python Basics: Everyday Calculations with math
How many boxes do you need? Are two measurements close enough? How far apart are two points? Python’s standard-library math module provides useful helpers for these small …
October 13, 2026
Python Basics: Copying and Moving Files with shutil
Preparing sample folders is a useful way to learn file automation. Python’s standard-library shutil module supplies copying, moving, and directory-removal operations. Here, every …
October 13, 2026
Python Basics: Checking Documentation Examples with doctest
A short example beside a function can explain how to use it. Python’s standard-library doctest module lets you check that example when the implementation changes. Before you start …
October 13, 2026