I'm getting the data from a json file in a website. So I did this.
import requests
r = requests.get('https://corona.lmao.ninja/historical/spain')
r = r.json()
for data in r['timeline']['cases']:
print(data)
But I'm not able to take the number cases, just the date. I tried with data[0] but it just take the first char from the first element. So I don't have any idea how I could take the second element.
Thanks and sorry for my English.