📝 Edit page
➕ Add page
Data structures
A comparison of data structure syntax and usage in Python
Topics
Pages
-
Counter
"dict subclass for counting hashable objects"
- Data class
- Default dict
- Dictionary
- List
-
Named tuple
Create tuples with named fields
- Set
- Tuple
-
deque
The double-ended queue in Python
Content
If you are interested in key-value pairs, see these cheatsheets:
- Dictionary
- Named tuple
- Typed dictionary in the Type Checks section.
See also Python Sorting cheatsheet.