I have a dictionary that looks like that:
grades = { \'alex\' : 11, \'bob\' : 10, \'john\' : 14, \'peter\': 7 }
Use all():
if all(name in grades for name in students): # whatever