Код: Выделить всё
weather = {"Monday": 12, "Tuesday": 14, "Wednesday": 15, "Thursday": 14, "Friday": 21, "Saturday": 22, "Sunday": 24}
for val in weather.keys():
weather[val] = round(((weather[val]*(5/9))+32),2)
print(weather)
Код: Выделить всё
weather_f = {val for val in weather_c.keys() weather_c[val] = round(((weather_c[val]*(5/9))+32),2)}
print(weather_f)
Подробнее здесь: https://stackoverflow.com/questions/798 ... -in-python