Okay I'm trying to go for a more pythonic method of doing things.
How can i do the following:
required_values = ['A','B','C']
some_map = {'A' : 1, 'B' : 2, 'C' : 3, 'D' : 4}
for required_value in required_values:
if not required_value in some_map:
print 'It Doesnt Exists'
return False
return True
I looked at the builtin function all
, but I cant really see how to apply that to the above scenario.
Any suggestions for making this more pythonic?