A curated list of the best free resources for learning Python from scratch — guides, references, common-error fixes, and hands-on practice.
Every linked guide below is a free, beginner-first tutorial from pythonbeginner.help — a learning and problem-solving resource for new Python programmers. Start at the homepage or jump straight to a topic.
Looking for a quick reference or hands-on practice? See the companion repos at the bottom of this list.
- Getting Started
- Core Language
- Data Structures
- Functions & Modules
- Files & Errors
- Object-Oriented Python
- Fixing Common Errors
- How-To Recipes
- Built-in Function Reference
- Companion Repositories
- Contributing
- What Is Python? A Beginner-Friendly Introduction — what Python is and why it's a great first language.
- Why Learn Python? Use Cases and Benefits — a quick tour of what you can do with Python.
- How to Install Python on Windows, macOS, and Linux — get a working Python on any OS.
- How to Run Python Code (Command Line and IDEs) — the different ways to actually run a script.
- Your First Python Program: Hello World Explained — line-by-line walkthrough of your first program.
- How to Create and Use a Virtual Environment in Python — keep your project dependencies isolated.
- How to Install a Python Package with pip — add third-party libraries.
- Python Syntax Basics Explained — statements, expressions, and the rules.
- Python Indentation Rules and Why They Matter — whitespace is part of the syntax in Python.
- Python Comments Explained (Single-Line and Multi-Line) — why and how to comment your code.
- Python Keywords Explained (Beginner Guide) — the reserved words Python won't let you reuse.
- Understanding Python Statements and Expressions — the difference between the two.
- Python Variables Explained for Beginners — naming, assignment, and how variables work.
- Python Data Types Overview — strings, numbers, booleans, and more.
- Python Numbers Explained (int, float, complex) — arithmetic and numeric types.
- Python Booleans Explained (True and False) — truth values and
bool(). - Type Conversion in Python (Casting Between Types) —
int(),str(),float(), and friends. - if Statements Explained — making decisions in code.
- if / elif / else Explained — multi-branch decisions.
- for Loops Explained — repeating work a fixed number of times.
- while Loops Explained — repeating work until a condition changes.
breakandcontinueStatements — control flow inside loops.passStatement Explained — the do-nothing placeholder.
- Lists Explained (Beginner Guide) — ordered, mutable collections.
- Tuples Explained — immutable sequences.
- Dictionaries Explained — key/value lookups.
- Sets Explained — unique, unordered collections.
- When to Use Lists vs Tuples vs Sets vs Dictionaries — choosing the right structure.
- Mutability in Python Explained (Mutable vs Immutable Types) — why some values change in place and others don't.
- List Comprehensions Explained — concise ways to build lists.
- Dictionary Comprehensions Explained — concise ways to build dicts.
- Functions Explained — defining and calling functions.
- Function Parameters and Arguments in Python — passing data in.
- Return Values in Python Functions — getting data back out.
- Default and Keyword Arguments Explained — flexible function calls.
- Lambda Functions Explained — small anonymous functions.
- Python Modules Explained — reusing code across files.
- How Import Works in Python — the
importsystem, demystified.
- File Handling Basics (Read and Write) — working with files safely.
- Python Errors and Exceptions Explained — what goes wrong and why.
- Using try, except, else, and finally in Python — handling errors gracefully.
- Raising Exceptions in Python — how and when to throw your own errors.
- Object-Oriented Programming in Python Explained — the big picture of OOP.
- Python Classes and Objects Explained — defining a class and creating instances.
- The
__init__Method in Python Explained — initialising new objects. - Instance vs Class Variables in Python — data shared vs per-object.
- Basic Methods in Python Classes Explained — defining behaviour on objects.
- Generators in Python Explained — lazy iteration with
yield. - Iterators and Iterable Objects Explained — the iterator protocol.
- Decorators in Python (Beginner Introduction) — wrapping functions to add behaviour.
The most-searched beginner errors, each with causes and a step-by-step fix:
- Common Python Errors — Beginner Guide
AttributeError: 'NoneType' object has no attribute ...AttributeError: 'list' object has no attribute ...AttributeError: 'str' object has no attribute ...IndexError: list index out of rangeIndexError: tuple index out of rangeKeyErrorwhen accessing a dictionaryKeyError: key not found in dictionaryIndentationError: unexpected indentIndentationError: expected an indented blockImportError: No module named XModuleNotFoundError: No module named XFileNotFoundError: [Errno 2] No such file or directorySyntaxError: invalid syntaxSyntaxError: missing colonNameError: name is not definedTypeError: 'int' object is not iterableTypeError: can only concatenate str (not "int") to strTypeError: list indices must be integers or slicesZeroDivisionError: division by zeroValueError: invalid literal for int() with base 10
➡️ Full error index: pythonbeginner.help/errors
Short, task-focused answers:
- How to convert a string to an int
- How to convert an int to a string
- How to convert a string to a float
- How to format strings in Python
- How to check if a file exists
- How to read a file in Python
- How to write to a file in Python
- How to append to a file
- How to check if a key exists in a dictionary
- How to loop through a dictionary
- How to check if a string contains a substring
- How to split a string in Python
- How to join strings in Python
- How to add an item to a list
- How to sort a list in Python
- How to remove duplicates from a list
- How to get user input in Python
- How to use
enumerate()in Python - How to use list comprehensions in Python
- How to make an API request in Python
- How to parse JSON in Python
- How to handle exceptions in Python
- How to debug Python code (Beginner Guide)
➡️ All recipes: pythonbeginner.help/how-to
Clear explanations of Python's built-ins:
abs()·all()·any()·bool()·dict()·enumerate()·filter()·float()·input()·int()·isinstance()·len()·map()·max()·min()·range()·round()·set()·sorted()·str()·sum()·tuple()·type()·zip()
➡️ Full reference: pythonbeginner.help/reference
All four are maintained by python-beginner-help:
- awesome-python-for-beginners — you are here.
- python-cheatsheet — one-page Python syntax reference.
- python-beginner-exercises — runnable practice problems with self-checks and worked solutions.
- python-error-fixes — searchable index of common Python errors and fixes.
- pythonbeginner.help — the site source.
Suggestions welcome — open an issue or pull request. Please keep entries beginner-friendly and free to access.
To the extent possible under law, pythonbeginner.help has waived all copyright and related rights to this list (CC0 1.0).
