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