I tried:
d = {3:'a',2:'b'}
if 'B' in d.values():
print 'True'
For me B
is equal to b
, but I don't want change my dictionary.
It is possible test for case insensitive matches against the values of a dictionary?
How to check if 'B'
is present in the dictionary without changing the values?
More complex:
d = {3:'A',2:'B',6:'c'}