Say all of w, x, y, and z can be in list A. Is there a shortcut for checking that it contains only x--eg. without negating the other variables?
w, x, y, and z
I'm not sure what without negating the other variables means, but I suspect that this is what you want:
if all(item == x for item in myList): #do stuff