Does the value exist?
- values
user = {
'fname': 'Foo',
'lname': 'Bar',
}
print('fname' in user.values()) # False
print('Foo' in user.values()) # True
False
True
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
user = {
'fname': 'Foo',
'lname': 'Bar',
}
print('fname' in user.values()) # False
print('Foo' in user.values()) # True
False
True