I have a list that contains lists.
'prices': [[1642896000000, 35180.435462830384],
[1642982400000, 36306.409440464704],
[1643068800000, 36774.00714224005],
[1643155200000, 36988.928510667356],
[1643241600000, 36870.440166930995],
[1643328000000, 37276.839558174994],
[1643414400000, 37852.57902803263],
[1643479053000, 37713.12901572592]],
I trying to get a single list of the values in the 2nd part of each list, ideally ending up with
35180.43,36306.25,...
rather than [35180.43,36306.25,...]
I'm trying
resp = json.loads(response.text) # this retursn a big list
history = []
for i in resp:
day = (i['prices'][0][1]) # this i think should select the value i want from the list of lists
history.append(day) # i was hoping this would append `day` to history to do i want i want. But it doesnt
This is probably the wrong way, and I suspect there is a far easier way
Thanks