Understanding Python If Else Statements
How if, elif and else work in Python, what counts as true, and the six mistakes that trip beginners up — colons,…
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.
56 guides
How if, elif and else work in Python, what counts as true, and the six mistakes that trip beginners up — colons,…
How to scrape a web page with Python responsibly: requests and BeautifulSoup, reading robots.txt, rate limiting, and when to use an API…
RecursionError means your function called itself too many times. Here is how to find the missing base case, when to raise the…
How to check whether a key exists in a Python dictionary, why the in operator beats has_key and try/except, and when .get()…
What graph conductance measures, why a low score means you have found a real community, and how to compute it in Python…
Python has no tuple comprehension. Here is what the parentheses actually create, how to build a tuple from a comprehension, and when…
The core of Python in one page: variables, types, conditions, loops, functions and lists, each with a runnable example and the mistake…
Installed Python on macOS and the terminal still says command not found, or runs the wrong version? python vs python3, Homebrew vs…
Four ways to pull the file name out of a path in Python, when to use pathlib instead of os.path, and how…
np.stack() joins arrays along a brand-new axis. Here is what that means, how it differs from concatenate, vstack and hstack, and when…
Take a Python script from a single messy file to a real project: folders, a virtual environment, a requirements file, tests and…
Python is installed but Windows cannot find it. The cause is a missing PATH entry or the Microsoft Store alias. Three fixes,…
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.