
Lists in Python
A Python list is not just a container. It is an ordered, changeable collection that stores many values in one variable and lets you grow, shrink, or…
Read tutorialWork confidently with lists, dictionaries, files, CSV, JSON, sorting, filtering, and other everyday data tasks.
Tutorials
Follow these lessons in order, or jump directly to the topic you need.

A Python list is not just a container. It is an ordered, changeable collection that stores many values in one variable and lets you grow, shrink, or…
Read tutorial
Dictionaries have been my favorite data structure throughout my 20 years as a software engineer. When I interviewed at Google, one of the problems I was…
Read tutorial
If you already know how to use lists in Python, you have the foundation for two more data structures that solve specific problems. Tuples protect fixed…
Read tutorial
A Python program that never touches a file forgets everything the moment it exits. File I/O is how your code keeps data after the run ends—saving notes,…
Read tutorial
Reading about lists and dictionaries teaches you the vocabulary. Running exercises teaches you the language. These beginner drills turn the four core…
Read tutorial
The fastest way to make Python feel real is to build something small that collects data, organizes it, saves it to a file, and reads it back. In this…
Read tutorial
You know how to build a list. Now comes the part that makes lists genuinely useful: pulling out exactly the items you need. Indexing grabs one item by…
Read tutorial
You have a list of numbers that needs to be in order. Or a dictionary of products where you only want the ones under a certain price. Every real Python…
Read tutorial
CSV files are how the working world hands data to Python. If you've ever exported a spreadsheet, downloaded a report from a website, or pulled data from a…
Read tutorial
JSON is the closest thing programming has to a shared language. When one program needs to send data to another—across the internet, between a server and an…
Read tutorial
You copy a list in Python, change the "copy," and the original changes too. If you have hit this, you are not alone. It is one of the most common beginner…
Read tutorial
Reading about file handling is easy. Writing code that actually reads a file, transforms its data, and writes something new back to disk is where the skill…
Read tutorial
You have a handful of related values and a small script to write. Should they go in a list or a dictionary? Both can hold a group of items, so the…
Read tutorial
You write a file path as a string. Your script works perfectly on your machine. Then you share it with a friend on Windows—or move it to a server running…
Read tutorial
Counting words in Python sounds trivial until you try it on real text. The moment your sentence contains a comma, a capital letter, or an ellipsis, the…
Read tutorial
You know the feeling. You write user["email"], run your script, and Python stops everything with a KeyError because that key doesn't exist. The data came…
Read tutorial