Introduction
Dictionaries are a powerful data structure in Python that allow you to store key-value pairs. Sometimes, you may need to find the key associated with a particular value in a dictionary. In this challenge, you will write a function that takes a dictionary and a value as input, and returns the first key in the dictionary that has the given value.
Skills Graph
%%%%{init: {'theme':'neutral'}}%%%%
flowchart RL
python(("`Python`")) -.-> python/BasicConceptsGroup(["`Basic Concepts`"])
python(("`Python`")) -.-> python/ControlFlowGroup(["`Control Flow`"])
python(("`Python`")) -.-> python/DataStructuresGroup(["`Data Structures`"])
python(("`Python`")) -.-> python/FunctionsGroup(["`Functions`"])
python(("`Python`")) -.-> python/AdvancedTopicsGroup(["`Advanced Topics`"])
python(("`Python`")) -.-> python/PythonStandardLibraryGroup(["`Python Standard Library`"])
python/BasicConceptsGroup -.-> python/comments("`Comments`")
python/BasicConceptsGroup -.-> python/variables_data_types("`Variables and Data Types`")
python/ControlFlowGroup -.-> python/conditional_statements("`Conditional Statements`")
python/ControlFlowGroup -.-> python/for_loops("`For Loops`")
python/DataStructuresGroup -.-> python/tuples("`Tuples`")
python/DataStructuresGroup -.-> python/dictionaries("`Dictionaries`")
python/FunctionsGroup -.-> python/function_definition("`Function Definition`")
python/AdvancedTopicsGroup -.-> python/iterators("`Iterators`")
python/PythonStandardLibraryGroup -.-> python/data_collections("`Data Collections`")
python/FunctionsGroup -.-> python/build_in_functions("`Build-in Functions`")
subgraph Lab Skills
python/comments -.-> lab-13103{{"`Find Key by Value in Python Dictionary (Challenge)`"}}
python/variables_data_types -.-> lab-13103{{"`Find Key by Value in Python Dictionary (Challenge)`"}}
python/conditional_statements -.-> lab-13103{{"`Find Key by Value in Python Dictionary (Challenge)`"}}
python/for_loops -.-> lab-13103{{"`Find Key by Value in Python Dictionary (Challenge)`"}}
python/tuples -.-> lab-13103{{"`Find Key by Value in Python Dictionary (Challenge)`"}}
python/dictionaries -.-> lab-13103{{"`Find Key by Value in Python Dictionary (Challenge)`"}}
python/function_definition -.-> lab-13103{{"`Find Key by Value in Python Dictionary (Challenge)`"}}
python/iterators -.-> lab-13103{{"`Find Key by Value in Python Dictionary (Challenge)`"}}
python/data_collections -.-> lab-13103{{"`Find Key by Value in Python Dictionary (Challenge)`"}}
python/build_in_functions -.-> lab-13103{{"`Find Key by Value in Python Dictionary (Challenge)`"}}
end