I'm trying to follow the usage example of namedtuple( )
from the documentation, but I keep getting namedtuple is not defined
.
You need import collections
up top, then you can do collections.namedtuple
You can also do from collections import namedtuple
and it should work like in the docs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With