I have the list below that looks like this
my_test_data = []
when I print my_test_data I get the result below
[
{
'tnType': None,
'tnCode': None,
'postedDt': None,
'amt': None, 'tranDesc1': None
}
]
This to me looks like a dictionary in a list
I tried printing like this
for key, val in my_test_data.items():
print(key, val)
I got an error message like this : AttributeError: 'list' object has no attribute 'items'
I want to be able to read the value on every row and store that value in another list.
How can I read this one by one?