// resources

Resources

// Code Example
module_datetime.py
datetime, date, timedelta — current time, formatting with strftime, parsing with strptime, and calculating differences …
[ download ]
// Code Example
module_statistics.py
statistics — mean, median, mode, multimode, stdev. Five lines and a complete picture of your data.
[ download ]
// Code Example
module_time.py
time — sleep, time(), perf_counter. Pause execution, measure elapsed time, and build a countdown. Two functions that co…
[ download ]
// Code Example
module_collections.py
Counter and defaultdict — two tools that eliminate boilerplate. Count occurrences in one line, group items without chec…
16 downloads 06 May 2026 → Two Tools That Make Dicts Smarter
[ download ]
// Code Example
module_string.py
Built-in string constants — ascii_letters, digits, punctuation. Check membership, generate passwords, validate input, s…
16 downloads 06 May 2026 → Built-in String Constants
[ download ]
// Code Example
utils.py
Your first custom module. Three functions, one guard. Place it in the same folder as main.py and import away.
16 downloads 08 May 2026 → What If I Could Make My Own Module?
[ download ]
// Code Example
main.py
Imports from utils.py — both patterns side by side. Run this after utils.py is in the same folder.
16 downloads 08 May 2026 → What If I Could Make My Own Module?
[ download ]
// Exercise
squad_utils.py
The shared module. Three functions — format_name, is_active, squad_summary. Written once, imported by everything else.
[ download ]
// Exercise
briefing.py
Imports format_name and is_active from squad_utils. Prints a clean roster with status for each member.
[ download ]
// Exercise
report.py
Imports squad_summary from squad_utils. Prints total, active, and inactive count in three lines.
[ download ]
// Cheatsheet
Modules — The Full Picture
Everything you've learned about modules — in one place. random, math, datetime, statistics, time, collections, string, …
16 downloads 08 May 2026 → Modules — The Full Picture
[ download ]