namedtuple() is a factory function for
tuple subclasses. Here,
'whatsmypurpose'is the type name. When you create a named tuple, a class with this name (
whatsmypurpose) gets created internally.
You can notice this by using the verbose argument like:
Also you can try
type(p) to verify this.