-
-
Save codecademydev/b8803ce3f8a7bd5bc352e24023660092 to your computer and use it in GitHub Desktop.
Codecademy export
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
# Write your values_that_are_keys function here: | |
def values_that_are_keys(my_dictionary): | |
my_dictionary_smells_funny = [] | |
for value in my_dictionary.values(): | |
if value in my_dictionary.keys(): | |
my_dictionary_booty.append(value) | |
return my_dictionary_smells_funny | |
# Uncomment these function calls to test your function: | |
print(values_that_are_keys({1:100, 2:1, 3:4, 4:10})) | |
# should print [1, 4] | |
print(values_that_are_keys({"a":"apple", "b":"a", "c":100})) | |
# should print ["a"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment