Name - type() | Example | Notes |
---|---|---|
list | ['a', 1, 18.2] | Ordered list of items (~ Arrays) Mutable (can be changed after created) Items can be different data types Can contain duplicate items |
tuple | ('a', 1, 18.2) | Just like a list; except: Immutable (cannot be changed) |
dict | {"apples": 5, "pears": 2, "orange": 9}} | Unordered key-value pairs Keys don’t have to be same data type Values don’t have to be same data type Keys are unique; must be immutable |