Category python-examples

Advantages of Python namedtuple

Python Advantages of namedtuples. Python has a dedicated namedtuple container type, but it seems to be underappreciated. It’s one of those underappreciated yet amazing features of Python. Namedtuples allow you to manually define classes, and this section will also introduce…