What does the following code output? from collections import namedtuple Point = namedtuple(‘Point’, [‘x’, ‘y’]) p = Point(3, 4) print(p.x, p[1], len(p))
Python DeveloperMedium
Python Developer — Medium
What does the following code output? from collections import namedtuple Point = namedtuple(‘Point’, [‘x’, ‘y’]) p = Point(3, 4) print(p.x, p[1], len(p))