偶然路过的靓仔-胡阳

为中华之崛起而读书!中国加油! 问题不能及时回答,有需要的话加微信:921308494

   ::  ::  ::  ::  :: 管理

  print (response.json()['data']['patientId'])
TypeError: list indices must be integers or slices, not str

 

原因:{...'data':[{'patientId':''}] }

 

解决方法:

  print (response.json()['data'][0]['patientId'])

posted on 2023-01-04 18:07  偶然路过的靓仔-胡阳  阅读(377)  评论(0)    收藏  举报