Python Data Structures Cheat Sheet
These are the list, dictionary, and set operations you'll use most. We added how fast each one runs in case an interviewer asks.
What's on the sheet
- List. Use a list when order matters and you need to index into it.
- Dictionary. Use a dictionary to look things up by key, or to group and count things.
- Set. Use a set to check if you've seen something before or to drop duplicates.
How to get it
This sheet is free. You don't need an account to download the PDF above.
Each coding pattern also has its own sheet. You unlock it by solving that pattern's problems. See the pattern sheets.
