2
我想用python編寫我的第一個API查詢。我打電話給一個非常簡單的數據集。 (http://api.open-notify.org/astros.json)。這將顯示有關空間中人數的信息。Python - 顯示json數據
我可以返回數字,但我想嘗試顯示名稱。到目前爲止,我有:
import requests
response = requests.get("http://api.open-notify.org/astros.json")
data = response.json()
print(data["number"])
任何幫助將不勝感激。