Computer Science, asked by samiya6059, 1 year ago

How to check if a key exists in a Python dictionary?

Answers

Answered by pankajkumar66
1

hey mate!

In Python, you can use the in operator to check if a key exists in a dictionary. has_key() is deprecated in favor of key in d.

Similar questions