How would i go about cutting this output:
w = obs.get_weather()
w.get_temperature() # Get temperature in Kelvin
#output{'temp': 293.4, 'temp_kf': None, 'temp_max': 297.5, 'temp_min': 290.9}
To just this:
293.4
How would i go about cutting this output:
w = obs.get_weather()
w.get_temperature() # Get temperature in Kelvin
#output{'temp': 293.4, 'temp_kf': None, 'temp_max': 297.5, 'temp_min': 290.9}
To just this:
293.4
You can get dictionary value by using my_dictionary[key]. For your code it will be:
w.get_temperature()['temp']