0

I put my question in the notes of the code. I am new to programming. I will more and likely not understand very technical responses. Please, if you can, explain it in the easiest way.

while i < len(stored):
    # I'd like this to break if any of these values are zero. How do I do that?
    if (x, y, z, t) == 0:
        break
martineau
  • 112,593
  • 23
  • 157
  • 280

2 Answers2

1
while i <= len(stored):
    if 0 in (x, y, z, t):
        break
Paco H.
  • 1,946
  • 6
  • 17
1

You can use the in operator:

while i <= len(stored):
    if 0 in (x, y, z, t):
        break;
Mureinik
  • 277,661
  • 50
  • 283
  • 320