Advertisement
biswasrohit20

t

Mar 22nd, 2021
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. test_dict = {1: "one", 2: "two", 3: "three"}
  2.  
  3. def get_value(d, key):
  4. if key in d:
  5. return d[key]
  6. else:
  7. return None
  8.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement