Created
June 22, 2020 08:56
-
-
Save abhi923/3321ab7c4604ac34554dd05a44508cd8 to your computer and use it in GitHub Desktop.
This file contains 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
dictionary = {"cat" : "chat", "dog" : "chien", "horse" : "cheval"} | |
phone_numbers = {'boss' : 5551234567, 'Suzy' : 22657854310} | |
empty_dictionary = {} | |
words = ['cat', 'lion', 'horse', 'RAT'] | |
for word in words: | |
if word in dictionary: | |
print(word, "->", dictionary[word]) | |
else: | |
print(word, "is not in dictionary") | |
print(dictionary) | |
print(phone_numbers) | |
print(empty_dictionary) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment