Python Virtual Environments Explained
A virtual environment is a private folder of packages for one project. Why you need one, how to create and activate it…
Try: python lists, javascript functions, syntax error, first project
Plain-English Python guides, from installing it to writing small programs that do real work. Short examples you can copy, run and change.
14 guides
A virtual environment is a private folder of packages for one project. Why you need one, how to create and activate it…
How to open, read, write and append files in Python using with, plus the path and encoding traps that make files behave…
How to handle errors instead of crashing: catching specific exceptions, else and finally, raising your own, and why a bare except will…
A while loop repeats for as long as a condition stays true. How to write one, when to use it instead of…
Defining functions, parameters and defaults, keyword arguments, return values, scope, docstrings and when to split code into functions.
Dictionaries store labelled values. Here is how to create, read, update and loop over them, plus how to avoid the KeyError that…
Creating lists, indexing, slicing, adding and removing items, sorting, and the copy trap that catches every Python beginner at least once.
How for loops work in Python: looping over lists, using range, enumerate and zip, break and continue, and building a list from…
How conditions work in Python: comparison operators, elif chains, and, or, not, truthiness, and why indentation decides what runs.
Strings, integers, floats, booleans, lists, dictionaries and None — what each is for, how to convert between them, and how to check…
How variables work in Python: creating them, naming rules, multiple assignment, and the mutable-versus-immutable behaviour that surprises beginners.
Write, save and run your first Python program, then extend it. Every line explained, plus the three errors beginners hit in the…
Related topics
The fastest way to improve is to read one guide, then build the thing it describes. Start with the basics, or jump straight to a project.