Skip to content

Tag: list

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

Building Your Own Collection in Python

Learn how to build your own Collection in Python step by step: Container, Sized and Iterable explained, plus the difference between an Iterator and an Iterable.

May 27, 2018

Sorting Lists in Python, with Examples

Learn the different ways to sort a list in Python, specifying the field, substring, attribute, etc. to sort by, with clear and practical examples.

Aug 30, 2015

Python Lists, with Examples

Lists in Python are a data structure that stores an ordered collection of items, which don't have to be of the same type. Learn how to use them with examples.

Apr 6, 2015