Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- test_dict = {1: "one", 2: "two", 3: "three"}
- def get_value(d, key):
- if key in d:
- return d[key]
- else:
- return None
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement