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
  • 119,623
  • 25
  • 170
  • 301

2 Answers2

1
while i <= len(stored):
    if 0 in (x, y, z, t):
        break
Paco H.
  • 2,034
  • 7
  • 18
1

You can use the in operator:

while i <= len(stored):
    if 0 in (x, y, z, t):
        break;
Mureinik
  • 297,002
  • 52
  • 306
  • 350