Named tuple
Level: Newbie
In this Bite, you'll learn about the namedtuple
object. These objects are similar to a regular tuple; However, while elements in a regular tuple are accessed by index, elements in a namedtuple
can be accessed by an attribute through dot notation, making your code more readable.