list = ['xy', 'yz', '=', '1', 'in', '>', 't']
for value in list:
if value is '0' or '1':
Zustand = value
print("Zustand:", Zustand)
The if loop should check if the value of list is 0 or 1. Why does it print every value? I also tried the "==" operator.