我正在使用這樣的 python 請求查詢 API...url = "www.example.com"response = requests.request("POST", url)response--------[ { "id": "485744", "descript": "firstitem", }, { "id": "635456", "descript": "seconditem", }, { "id": "765554", "descript": "thirditem", },]我正在嘗試像這樣訪問響應中的第一項...response = response.jsonprint(response[0])但我收到錯誤...TypeError: 'method' object is not subscriptable我哪里錯了?
Python從請求響應中獲取第一項
慕蓋茨4494581
2023-03-08 16:27:08