Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

if key not in dictionary python

dict_1 = {"a": 1, "b": 2, "c": 3}

if "e" not in dict_1:
    print("Key e does not exist")
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #key #dictionary #python
ADD COMMENT
Topic
Name
4+5 =