Python and JSON - TypeError list indices must be integers not str

前端 未结 3 966
有刺的猬
有刺的猬 2020-12-13 19:19

I am learning to use Python and APIs (specifically, this World Cup API, http://www.kimonolabs.com/worldcup/explorer)

The JSON data looks like this:

[         


        
3条回答
  •  不知归路
    2020-12-13 19:56

    I solved changing

    readable_json['firstName']
    

    by

    readable_json[0]['firstName']
    

提交回复
热议问题