python_tutorial_zero_2_hero is a structured Python learning repository designed to take a learner from absolute beginner concepts to intermediate and advanced professional topics. The project is organized as a course, not just a loose collection of scripts: each section focuses on a specific stage of Python growth, and the later sections build directly on the earlier ones.
This repository is suited for:
- complete beginners starting Python for the first time
- self-taught developers who want a cleaner, more systematic path
- students preparing for real projects, automation work, or junior Python roles
- intermediate learners who want to strengthen fundamentals before moving deeper
The tutorial currently includes:
- environment setup and first-run basics
- Python syntax, variables, strings, numbers, and booleans
- control flow, loops, and logic
- data structures and comprehensions
- functions, modules, packages, and scope
- files, paths, CSV, JSON, exceptions, and logging
- object-oriented programming
- standard library tools
- testing, debugging, and code quality
- intermediate Python features
- advanced Python concepts
- web APIs, scraping, SQLite, and data handling
- automation and scripting
- hands-on portfolio-style projects
For the best learning outcome, move through the folders in numeric order:
- Read the section
README.md. - Work through the lesson files in order.
- Run each
.pyfile yourself. - Modify examples and observe what changes.
- Use each section
CHEATSHEET.mdfor review. - Finish by building the projects in
13_projects/.
Recommended study method:
- do not skip early sections if you are new to Python
- type code manually at least once instead of only reading it
- break examples on purpose and fix them
- revisit the cheatsheets after completing each section
- use the projects to verify practical understanding
python_tutorial_zero_2_hero/
├── README.md
├── ROADMAP.md
├── CONTRIBUTING.md
├── LICENSE.md
├── 00_getting_started/
├── 01_python_basics/
├── 02_control_flow/
├── 03_data_structures/
├── 04_functions_modules/
├── 05_files_errors/
├── 06_object_oriented_python/
├── 07_standard_library/
├── 08_tooling_testing_quality/
├── 09_intermediate_python/
├── 10_advanced_python/
├── 11_web_apis_data/
├── 12_automation_scripting/
└── 13_projects/
Purpose: Set up Python correctly and learn the basic workflow for running files from the terminal and editor.
- 01_install_python.md - Python installation guidance
- 02_run_python_files.md - how to run Python scripts
- 03_using_terminal.md - terminal basics for beginners
- 04_editor_setup.md - editor setup and workflow
- 05_first_program.py - first executable Python program
- CHEATSHEET.md - quick reference for setup basics
Purpose: Build the first layer of Python fluency with input, output, variables, data types, and conversions.
- 01_print_input_comments.py - print, input, and comments
- 02_variables.py - variables and naming
- 03_numbers.py - numeric types and operations
- 04_strings.py - string basics and manipulation
- 05_booleans.py - boolean logic basics
- 06_type_conversion.py - casting and conversion
- 07_mini_quiz.md - short knowledge check
- CHEATSHEET.md - syntax and quick review
Purpose: Learn how programs make decisions and repeat actions through conditions and loops.
- 01_if_elif_else.py - conditional branching
- 02_comparison_logic.py - comparisons and logical operators
- 03_for_loops.py - iteration with
for - 04_while_loops.py - repetition with
while - 05_break_continue.py - loop control
- 06_pattern_practice.py - practice patterns
- CHEATSHEET.md - quick reference
Purpose: Work confidently with Python's core collection types and the common patterns used with them.
- 01_lists.py - list fundamentals
- 02_tuples.py - tuples and immutability basics
- 03_dictionaries.py - key-value data
- 04_sets.py - uniqueness and set operations
- 05_nested_data.py - nested structures
- 06_slicing.py - slicing patterns
- 07_comprehensions.py - comprehensions
- CHEATSHEET.md - quick reference
Purpose: Organize code into reusable functions, understand scope, and split code across modules and packages.
- 01_functions.py - defining and calling functions
- 02_parameters_returns.py - arguments and return values
- 03_scope.py - local and global scope
- 04_lambda_functions.py - lambda expressions
- 05_imports_modules.py - imports and module basics
- 06_package_basics.py - package structure basics
- 07_docstrings_type_hints.py - readable APIs with docs and hints
- helpers.py - support module used by lessons
- CHEATSHEET.md - quick reference
Purpose: Read and write files safely, process structured data, and handle runtime errors professionally.
- 01_read_write_text.py - text file I/O
- 02_paths.py - filesystem paths
- 03_csv_files.py - CSV processing
- 04_json_files.py - JSON processing
- 05_exceptions.py - exception handling
- 06_custom_exceptions.py - custom exception design
- 07_logging_basics.py - logging fundamentals
- CHEATSHEET.md - quick reference
Note: this section's lessons now generate their own temporary demo files at runtime, so the repository stays focused on source material.
Purpose: Learn how to model real-world behavior with classes, attributes, methods, inheritance, and data-focused objects.
- 01_classes_objects.py - classes and objects
- 02_instance_class_attributes.py - attribute types
- 03_methods_properties.py - instance behavior and properties
- 04_inheritance.py - inheritance basics
- 05_dunder_methods.py - special methods
- 06_dataclasses.py - dataclasses
- 07_composition_vs_inheritance.py - design tradeoffs
- CHEATSHEET.md - quick reference
Purpose: Use the built-in tools that make Python productive before reaching for third-party packages.
- 01_datetime.py - dates and times
- 02_math_random_statistics.py - common numeric utilities
- 03_collections.py - advanced collection helpers
- 04_itertools.py - iterator-building tools
- 05_functools.py - functional helpers
- 06_regex.py - regular expressions
- 07_subprocess.py - running external commands
- 08_argparse.py - command-line argument parsing
- CHEATSHEET.md - quick reference
Purpose: Build professional habits around environments, dependencies, testing, debugging, and maintainability.
- 01_virtual_environments.md - isolated Python environments
- 02_pip_dependencies.md - dependency installation basics
- 03_formatting_linting.md - formatting and linting concepts
- 04_unit_testing.py - unit testing basics
- 05_pytest_style_tests.py - pytest-style testing
- 06_debugging.py - debugging workflow
- 07_code_review_checklist.md - practical review checklist
- CHEATSHEET.md - quick reference
Purpose: Move beyond fundamentals into patterns that improve expressiveness, readability, and correctness.
- 01_iterators.py - iterator protocol
- 02_generators.py - generator functions
- 03_decorators.py - decorators
- 04_context_managers.py - resource management
- 05_type_hints_deep_dive.py - deeper typing concepts
- 06_protocols.py - structural typing and protocols
- 07_clean_code_refactoring.py - refactoring for readability
- CHEATSHEET.md - quick reference
Purpose: Study language internals, concurrency models, and architecture patterns used in serious Python systems.
- 01_descriptor_protocol.py - descriptor protocol
- 02_metaclasses.py - metaclasses
- 03_memory_model.py - memory and object behavior
- 04_concurrency_threads.py - thread-based concurrency
- 05_multiprocessing.py - process-based concurrency
- 06_asyncio.py - asynchronous programming
- 07_design_patterns.py - practical design patterns
- 08_architecture_boundaries.md - architectural separation and boundaries
- CHEATSHEET.md - quick reference
Purpose: Connect Python to the web, remote services, local databases, and structured data workflows.
- 01_http_basics.md - HTTP foundations
- 02_requests_client.py - making HTTP requests
- 03_rest_api_client.py - REST client patterns
- 04_web_scraping.py - scraping basics
- 05_sqlite_basics.py - SQLite fundamentals
- 06_data_analysis_csv.py - CSV data analysis
- 07_api_error_handling.py - robust API error handling
- CHEATSHEET.md - quick reference
Purpose: Apply Python to practical automation tasks and command-line workflows.
- 01_file_organizer.py - file organization automation
- 02_bulk_rename.py - batch rename utility patterns
- 03_log_parser.py - parsing log files
- 04_email_report.md - report automation concepts
- 05_cli_tool.py - command-line tool structure
- 06_scheduled_jobs.md - scheduling automation jobs
- CHEATSHEET.md - quick reference
Purpose: Consolidate knowledge through hands-on projects that require combining multiple skills.
- 01_solution.py - reference implementation
- 02_extensions.md - optional improvements
- 01_solution.py - reference implementation
- 02_tests.py - test coverage
- 01_api_client.py - API communication layer
- 02_cli.py - command-line interface
- 03_tests.py - test coverage
- 01_scraper.py - scraping logic
- 02_cleaner.py - data cleaning logic
- 03_tests.py - test coverage
- README.md - project introduction and curriculum index
- ROADMAP.md - long-term direction for the repository
- CONTRIBUTING.md - contribution standards and workflow
- LICENSE.md - license information
If you are a beginner, use this sequence:
00_getting_started01_python_basics02_control_flow03_data_structures04_functions_modules05_files_errors06_object_oriented_python07_standard_library08_tooling_testing_quality09_intermediate_python10_advanced_python11_web_apis_data12_automation_scripting13_projects
If you already know the basics, you can use the repository as a structured reference and jump directly to the section you need, but the numbering still reflects the recommended progression.
Many Python repositories are either too shallow for serious study or too advanced for true beginners. This project aims to bridge that gap by keeping the material ordered, practical, and increasingly professional as you progress.
The goal is not only to help you learn Python syntax, but to help you understand how Python is used in real work:
- writing clear scripts
- structuring reusable code
- handling files and errors safely
- testing and debugging effectively
- working with APIs and data
- building practical automation tools
If you want to improve lessons, fix mistakes, or expand coverage, read CONTRIBUTING.md first. Contributions should preserve the tutorial's teaching quality, structure, and progression.
See LICENSE.md for licensing details.