Python - Namedtuples Examples
Published on Wed, 27 Sep 2017
By Harlin Seritt
Namedtuples are tuples turned into convenient containers for simple tasks. The standard tuple will only have integer indexes for accessing individual members. For example:
>>> trees = ["pecan", "oak", "hickory"]
To access these individually, I would need to do:
>>> trees "oak"
Namedtuples are tuples that allow you to access ...