Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

find if value exists in dictionary python

# python check if value exist in dict using "in" & values()
if value in word_freq.values():
    print(f"Yes, Value: '{value}' exists in dictionary")
else:
    print(f"No, Value: '{value}' does not exists in dictionary")
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #find #exists #dictionary #python
ADD COMMENT
Topic
Name
3+1 =