python:实现openweathermap API查找任何城市的当前天气(附完整源码)

暴奕
2023-12-01

import requests, json 
# Enter your API key here 
api_key = "Your_API_Key"
# base_url variable to store url 
base_url = "http://api.openweathermap.org/data/2.5/weather?"
# Give city name 
city_name = input("Enter city name : ") 
# complete_url variable to store 
 类似资料: