the field names are passed to the namedtuple method as comma and/or whitespace separated values they can also be passed as sequence of strings field names are single strings and they can be any legal python identifier that does not begin with digit or an underscore typical example is shown herethe namedtuple method take two optional boolean argumentsverbose and rename when verbose is set to true then the class definition is printed when it is built this argument is depreciated in favor of using the __source attribute when the rename argument is set to true then any invalid field names will be automatically replaced with positional arguments as an examplewe attempt to use def as field name this would normally generate an errorbut since we have assigned rename to truethe python interpreter allows this howeverwhen we attempt to look up the def valuewe get syntax errorsince def is reserved keyword the illegal field name has been replaced by field name created by adding an underscore to the positional valuein addition to the inherited tuple methodsthe named tuple also defines three methods of its own_make(asdict()and _replace these methods begin with an underscore to prevent potential conflicts with field names the _make(method takes an iterable as an argument and turns it into named tuple objectfor example