Re: Key Error: "city"

2017-09-09 Thread Thomas Jollans
On 09/09/17 07:58, V Vishwanathan wrote: > alert = "Today's forecast for {city}: The temperature will range > from{low_temperature} "" to ""{high_temperature}{temperature_unit}Conditions > will be > {weather_conditions}".format(city,low_temperature,high_temperature,temperature_unit,weather_condi

Re: Key Error: "city"

2017-09-08 Thread Ben Finney
V Vishwanathan writes: > alert = "Today's forecast for {city}: The temperature will range > from{low_temperature} "" to ""{high_temperature}{temperature_unit}Conditions > will be > {weather_conditions}".format(city,low_temperature,high_temperature,temperature_unit,weather_conditions) > print(a

Key Error: "city"

2017-09-08 Thread V Vishwanathan
(1) Trying to convert concatenated string to .format method (2) concatenated string >> [#todo rewrite this line to use the format method rather than string concatenation alert = "Today's forecast for " + city + ": The temperature will range from " + str(low_temperature) + " to " + str(high_temper