
Grow Your Career
Python: From Zero to Hero
The complete beginner's guide to Python 3
Learn Python 3 from scratch in 29 short chapters, each with a runnable example, a practice task and a worked answer. Finish by building two complete command-line projects.
Who it's for: Complete beginners with no programming experience, and people who know another programming language and want to pick up Python.
No tax is added to this price. Prices shown for United States. You're charged in USD, the currency shown.
- Digital product. Nothing is shipped. You download the files after payment is confirmed.
- Access: files appear on your order page and in My Library, and we email you a link. Each item can be downloaded up to 10 times; ask us if you need more.
- Refunds: see the refund policy for when we can refund a digital purchase.
About this title
This book assumes no programming experience. You start by installing Python and running your first script, then work step by step through values, decisions, loops, collections, functions, files, classes, testing and command-line tools.
Every chapter has two parts: a short lesson with an example you run yourself, and a practice page with a task, a worked answer and a check of your understanding. You are encouraged to predict what a change will do before you run it, so you learn to read code, not just copy it.
The book ends with two projects, each with full source code, sample inputs, expected output and checks you can repeat: a reading tracker that saves your progress to JSON between runs, and an expense reporter that reads a CSV file and reports valid spending totals and skipped records. A Python quick reference closes the book.
All examples use Python 3.10 or later and only the standard library, so there is nothing extra to install. Already know another language? The book suggests which Python-specific chapters to review before you jump to the projects.
Contents
- Part I: Getting started (chapters 1 to 5): first program, terminal and REPL, variables and types, numbers, strings
- Part II: Control flow and collections (chapters 6 to 13): if, truth values, loops, lists, dictionaries, tuples, sets, comprehensions
- Part III: Reusable code and files (chapters 14 to 22): functions, modules, virtual environments, files, exceptions, CSV, JSON, dates and times
- Part IV: Building reliable programs (chapters 23 to 29): classes, dataclasses, generators, regular expressions, logging, unittest, command-line arguments
- Project 1: Build a reading tracker
- Project 2: Build an expense reporter
- Python quick reference
What you'll get from it
- Write and run Python scripts from the terminal and use the REPL
- Use variables, strings, numbers, lists, dictionaries, tuples and sets
- Control a program with if statements, for and while loops
- Write reusable functions and organise code into modules
- Read and write text, CSV and JSON files and handle errors
- Model data with classes and dataclasses
- Debug, log and test your code with unittest
- Build complete command-line tools with argparse
Reviews from verified buyers
No reviews yet. Only customers who bought this title can review it.
