| Type | Name | Mutability | Behavior |
|---|---|---|---|
| Integer | int |
Immutable | Modification: creates new object, similar to Value Copy effect |
| Float | float |
Immutable | Modification: same as above |
| String | str |
Immutable | Modification: same as above |
| Boolean | bool |
Immutable | Modification: same as above, bool inherits from int |
| Tuple | tuple |
Immutable |
|
| List | list |
Mutable |
|
| Dictionary | dict |
Mutable |
|
| Set | set |
Mutable |
|
| Custom Class | class |
Mutable by default |
|
tuple
list
dict
set
len(), min(), max(), sum(), and
Iterator methods shown in
Python 101 · Iterators, Generators, Comprehensions, Iterable, Hashable.
join, split, find, replace, count;
upper, lower, title, capitalize, etc.
str.format() since Python 3.6
isinstance(),
@typechecked, pydantic, or numpy with type specifiers, to ensure data
integrity.