我已经调用了这个方法,但是当数据返回时,它在数据下方返回一个 None 。我该如何防止呢?
def weather_Connection(interval,apikey):
print print_forecast('Choa Chu Kang',get_response('/forecast/apikey/1.394557,103.746396'))
print print_forecast('Yishun',get_response('/forecast/apikey/1.429463,103.84022'))
print print_forecast('Redhill',get_response('/forecast/apikey/1.289732,103.81675'))
print print_forecast('Jalan Besar',get_response('/forecast/apikey/1.312426,103.854317'))
print print_forecast('Jurong West',get_response('/forecast/apikey/1.352008,103.698599'))
print print_forecast('Tampines',get_response('/forecast/apikey/1.353092,103.945229'))
数据以这种方式返回
cloudCover : 0.75
dewPoint: 24.87
humidity: 80.00
icon : partly-cloudy-night
ozone : 276.67
precipIntensity : 0
precipProbability : 0
pressure : 1009.61
summary : Dry and Mostly Cloudy
temperature: 28.56
visibility : 6.21
windBearing : 127
windSpeed : 4.57
psiAverage : 20
latitude : 1.394557
longitude : 103.746396
location : Choa Chu Kang
None