- You can assign a name to each of the
namedtuplemembers and refer to them that way, similarly to how you would access keys indictionary. - Each member of a namedtuple object can be indexed to directly, just like in a regular
tuple. -
namedtuplesare just as memory efficient as regulartuples. - No import is needed to use
namedtuplesbecause they are available in the standard library.
Correct Answer:
- No import is needed to use
namedtuplesbecause they are available in the standard library.
**We need to import it using from collections import namedtuple **