What does an ‘x = y or z’ assignment do in Python? Technology Community › Category: Python › What does an ‘x = y or z’ assignment do in Python? 0 Vote Up Vote Down VietMX Staff asked 4 years ago x = a or b If bool(a) returns False, then x is assigned the value of b.