< Python > Some python tricks you may never use But you should know
namedtuple
If you are too lazy to create a class but you still want to use a variable that can act as a class object, then you should use namedtuple:
1 | from collections import namedtuple |
result:
1 | (1,2,3) |