DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
check if a given key already exists in a dictionary
d = {'a': 1, 'b': 2} 'a' in d # <== evaluates to True 'c' in d # <== evaluates to False
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#check
#key
#exists
#dictionary
ADD COMMENT
Topic
COMMENT
Name
3+4 =
Submit