I have a task to work with file https://github.com/mledoze/countries/blob/master/countries.json , which is pretty big. Firstly, I downloaded it with wget
and tried to work with 0 element:
import wget
print('Beginning file download with wget module')
url = 'https://raw.githubusercontent.com/mledoze/countries/master/countries.json'
wget.download(url, 'сountries.json')
handle = open("сountries.json", "r")
data = handle.read()
print(data[0])
handle.close()
However, the whole json file was recognized as "str", and as 0 element I recieved just "[" how can I fix this?