Home / Python Tips Generated By ChatGPT / Named Tuples for Readable Code in Python Create tuples with named fields. Source Code from collections import namedtuple Point = namedtuple("Point", ["x", "y"]) p = Point(10, 20) print(p.x, p.y)