I have the following code:
from collections import namedtuple
Test = namedtuple('Test', ['number_A', 'number_B'])
test_1 = Test(number_A=1, number_B=2)
test_2 = Test(number_A=3, number_B=4)
test_3 = Test(number_A=5, number_B=6)
My question is how can I print all namedtuples, for example:
print (Test.number_A)
I want to see somthing like this as a result:
1
3
5
any ideas? thanks..
Martijn Peters advises in the comments:
Here is what that looks like:
Gives: