Hey guys here´s my problem.
Lets say I have two dictionaries and a list containing both dictionaries:
a={1:"hello",2:"goodbye"}
b={1:"Hi",2:"Farewell"}
list1=[a,b]
Now, if I iterate over the entire list like this, everything works fine:
for e in list1:
print(e[1])
However, whenever I try to iterate over the list by using the list index number, python throws an error message ("TypeError: 'int' object has no attribute 'getitem'")
for e in list1[0]:
print(e[1])
Could someone explain how I can access the dictionary value of a certain item in a list with a list index number?
Thanks in advance for your help!