Python Dictionary | check key and value exist or not


Python Dictionary | check key and value exist or not

if 'name' in user_info2:
    print("prensent")
else:
    print("not present")

Check value is exist in pyhton dictionary —–>

value method

if  22  in user1.values():
    print('exis')
else:
    print('not exist'

Python Dictionary | check key and value exist or not

Have any Question or Comment?

Leave a Reply

Your email address will not be published. Required fields are marked *

Categories