!curl https://raw.githubusercontent.com/MicrosoftLearning/intropython/master/world_temp_mean.csv -o mean_temp.txt
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 222 100 222 0 0 1370 0 --:--:-- --:--:-- --:--:-- 1370
# [] create The Weather
mean_temp_text = open('mean_temp.txt', 'a+')
mean_temp_text.write('\nRio de Janeiro,Brazil,30.0,18.0')
mean_temp_text.seek(0,0)
headings = mean_temp_text.readline()
headings = headings.split(',')
city_temp = mean_temp_text.readline().strip('\n')
while city_temp:
city_temp = city_temp.split(',')
print('City of',city_temp[0],headings[2],'is', city_temp[2], "Celcius")
city_temp = mean_temp_text.readline().strip('\n')
mean_temp_text.close()
City of Beijing month ave: highest high is 30.9 Celcius
City of Cairo month ave: highest high is 34.7 Celcius
City of London month ave: highest high is 23.5 Celcius
City of Nairobi month ave: highest high is 26.3 Celcius
City of New York City month ave: highest high is 28.9 Celcius
City of Sydney month ave: highest high is 26.5 Celcius
City of Tokyo month ave: highest high is 30.8 Celcius