Variables and Data Types in Python
What a variable really is in Python, the built-in types, how conversion works, and the mutability rule that explains a whole family…
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.
82 guides
What a variable really is in Python, the built-in types, how conversion works, and the mutability rule that explains a whole family…
os.rmdir only removes empty directories. Here is how to delete a folder with contents safely, handle permission errors, and avoid deleting the…
scikit-learn renamed the method to get_feature_names_out() in version 1.0 and removed the old name in 1.2. Here is the fix and a…
Type hints document what a function expects and let a checker find bugs before the code runs. The syntax for every common…
Flask is small and unopinionated; FastAPI is built for APIs with validation, docs and async included. The same endpoint in both, where…
The abstract base classes moved from collections to collections.abc in Python 3.10. Here is how to identify the outdated package and the…
NumPy raises this when the data you passed is ragged or contains mixed types. Here is how to find the offending row…
Choosing the right chart, then building it with matplotlib, pandas or seaborn — plus the design changes that make a chart readable.
The security work that matters in Python: SQL injection, pickle, subprocess, secrets, dependency scanning and the randomness mistake.
The four libraries that matter — NumPy, pandas, matplotlib and scikit-learn — and a complete first analysis from loading a CSV to…
Feed a file into a Python script that reads from stdin: shell redirection, pipes, sys.stdin, fileinput, and redirecting inside the program itself.
You looped over, unpacked or converted something that has no items: an int, None, a function, or an object of your own…
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.