Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def getForecast():
- zip2 = '60103'
- url = 'http://api.openweathermap.org/data/2.5/forecast?zip='
- '' + zip2 +
- ',us&appid=7f5941b864a5fde449419c6aaca23540&units=imperial'.format(zip2)
- response = requests.get(url)
- data2 = response.json()
- date_list = (data2['list'][0]['dt_txt'])
- date_list = date_list.split()
- del date_list[-1]
- new = list(date_list[0].split('-'))
- new1 = [int(x) for x in new]
- print(calendar.weekday(new1))
Add Comment
Please, Sign In to add comment