Suppose we want some block of code to be executed when both \'a\' and \'b\' are equal to say 5. Then we can write like :
if a == 5 and b == 5: # do something
If you have more variables to test, using all might be slightly more readable:
all
if all(i==5 for i in [a,b,c,d]): # do something