1 import requests 2 3 response = requests.get(host) 4 5 #無需import json庫 6 7 i = respon.json() 8 9 #此時可用字典的方式查詢,例如 10 print(i[''words_result']) 11 #若子項是list,可用for循環+字典將子項的查詢項打印,例如 12 for index in i()['words_result']: 13 print(index['words']) 14 15 #同名項也是for打印
