How to check value exists in the dictionary or not using membership operator?
Answers
Answered by
2
Answer:
Hey mate....
check if key exists in dictionary using get() Dictionary provides a method get() that accepts a key and default value. If given key exists in dictionary then it returns its value, If given key does not exists in dictionary then it returns the passed default value argument.
Similar questions
Math,
5 months ago
Math,
5 months ago
Geography,
10 months ago
CBSE BOARD XII,
10 months ago
Math,
1 year ago