How to Print a Python List (Every Useful Way)
Printing a list plainly, one item per line, numbered, joined into a sentence, or as a formatted table — with the join()…
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.
30 guides
Printing a list plainly, one item per line, numbered, joined into a sentence, or as a formatted table — with the join()…
What Python warnings mean, how to see them all, silence the ones you have decided about, and turn the dangerous ones into…
The array errors beginners hit most — IndexError, modifying while looping, the copy trap — plus the changes that actually make list…
Reading and writing files, handling paths that work on every machine, and the encoding trap that only appears on someone else’s computer.
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…
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.