Python, Data Science, Data Engineering, Programming, Coding.
tuples when we want to access tuple items using names instead of indexes. Or when we want to define a class with a few attributes and don’t want to define a full class. from collections import namedtuple # Creating a namedtuple Point = namedtuple('Point', ['x', 'y']) # Creating a Point point1 =