To create a namedtuple, you use the namedtuple() factory function, providing it with the name of the new class and a string or list of field names.
Python namedtuple is an immutable container type, whose values can be accessed with indexes and named attributes. It has functionality like tuples with additional features. A named tuple is created ...