Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Namedtuple not defined on windows interpreter [closed]

I'm trying to follow the usage example of namedtuple( ) from the documentation, but I keep getting namedtuple is not defined.

Traceback

like image 932
Paw in Data Avatar asked Sep 16 '25 05:09

Paw in Data


1 Answers

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

like image 68
pacukluka Avatar answered Sep 17 '25 20:09

pacukluka