Python Byte to String Encoding
How to convert bytes to str and back, what UTF-8 actually is, and how to fix UnicodeDecodeError when a file is not…
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.
72 guides
How to convert bytes to str and back, what UTF-8 actually is, and how to fix UnicodeDecodeError when a file is not…
Install webdriver-manager with a hyphen, import it with an underscore — and check whether you need it at all, since Selenium 4.6…
Where to get pi in Python, why math.pi is a float rather than the exact number, and how to get more decimal…
Naming, structure, error handling, virtual environments, type hints and testing — the habits that make Python code easy to come back to.
Classes, objects, inheritance and the dunder methods that make Python objects feel built in — plus dataclasses and when a function is…
IPython is missing from the interpreter you are running. Here is the fix, including the capitalisation trap and the Jupyter kernel mismatch…
== asks whether two values are equal; is asks whether they are the same object. Use is only for None, True, False…
You put call brackets after something that is not a function. The type in the message names it. The usual cause is…
You used square brackets on something that does not support them: an int, a None, a function, a method you forgot to…
Installed Python 3.14 and now pip is missing, points at the old version, or fails to install packages? The three causes, the…
Four ways to import a module from a parent folder, why sys.path.append is the worst of them, and the editable install that…
Convert a dict to YAML with PyYAML, control the formatting, handle nested data and Unicode, and load YAML back safely.
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.