Skip to content

Tag: Immutable

Hashables in Python

What makes a Python object hashable, why lists aren't, how hash(), __hash__ and __eq__ work together, and how to make your own class hashable.

Nov 18, 2018

Mutable and Immutable Types in Python

Learn whether a variable can change (mutable) or not (immutable). Mutable: List, Dict, Set. Immutable: String, Int, Float, Bool, Tuple, Range, Decimal.

Aug 5, 2018