在sublime text中写入python函数,为什么不执行
import requests
import json
data ={
'city':'北京市'
}
url = 'http://wthrcdn.etouch.cn/weather_mini'
#res = requests.get(url,data)
#print(res.json())
def send_get(url,data):
res = requests.get(url=url,params=data).json()
return json.dumps(res,indent=2)