Using Python, I have a complex list that I am trying to pull various information from. When I print the entire list in question, below is what I get.
{'previous': None,
'results': [
{'account': 'https:REDACTED',
'url': 'https:REDACTED',
'amount': '4.32',
'payable_date': '2018-03-08',
'instrument': 'https:REDACTED',
'rate': '1.4400000000',
'record_date': '2018-03-05',
'position': '3.0000',
'withholding': '0.00',
'id': 'REDACTED',
'paid_at': None},
{'account': 'REDACTED', 'url': 'https:REDACTED',
...AND SO ON... }
This code -
for x in list:
print(x)
prints - 'previous' 'results' (which you can see are both to the left side of their respective colons (:))
I want to be able to print the information on the other side of the colon (:), so:
'results': [{'account': 'https:REDACTED', 'url': 'https:REDACTED',... etc.
printing x[0] results in 'r' (first letter in 'results').
How do I get to the information on the right side of the 'results' colon (:)? Thanks