Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to know if a key is in a dictionary python

dict = {"key1": 1, "key2": 2}

if "key1" in dict:
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #key #dictionary #python
ADD COMMENT
Topic
Name
6+8 =