Last active
February 22, 2021 00:38
-
-
Save leveled/a21115d3a512c6d8d97749906bf35efa to your computer and use it in GitHub Desktop.
using the zip function python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fahrenheit = {'t1':-30, 't2':-20, 't3':-10, 't4':0} | |
#Get the corresponding `celsius` values | |
celsius = list(map(lambda x: (float(5)/9)*(x-32), fahrenheit.values())) | |
#Create the `celsius` dictionary | |
celsius_dict = dict(zip(fahrenheit.keys(), celsius)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment