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 Key is Already Present in a Dictionary
my_dict = {1: 'a', 2: 'b', 3: 'c'} if 2 in my_dict: print("present")
Source by www.programiz.com #
PREVIOUS
NEXT
Tagged:
#Check
#Key
#Already
#Present
#Dictionary
ADD COMMENT
Topic
COMMENT
Name
6+8 =
Submit