2022-05-01
TL;DR collection.namedtuple is a memory-efficient shortcut to defining an immutable class in Python manually. Namedtuples can help clean up your code by enforcing an easier to understand structure on your data, which also improves readability.
2020-05-02