Skip to content

Latest commit

 

History

History

python

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Python starter (experienced-dev track)

Short artifacts for mapping Go / .NET muscle memory onto Python. Not a tutorial product.

Hello world (package + imports)

Virtualenv setup (create / activate / deactivate): see infrastructure/README.md.

From this directory (python/):

python3 -m infrastructure
# or, with a venv active: python -m infrastructure

That puts the current directory on sys.path, loads the infrastructure package, and runs infrastructure/__main__.py. The entrypoint imports infrastructure.greet.

Do not cd into infrastructure/ and run files as scripts — absolute package imports will break. Stay one level up and use -m.

Basics — skim order

Each file is runnable on its own: python3 basics/01_types_vars.py, etc.

Order File Maps from
1 basics/01_types_vars.py vars, annotations, None
2 basics/02_strings.py strings / f-strings
3 basics/03_control_flow.py if / for / while / match
4 basics/04_functions.py defs, *args/**kwargs, closures
5 basics/05_collections.py list, dict, tuple, set
6 basics/06_comprehensions.py list/dict/set comps, generators
7 basics/07_classes.py classes + dataclasses
8 basics/08_exceptions.py raise / try / except

Requires Python 3.10+ for match in 03_control_flow.py (rest is fine on 3.9+).