-1
for i in range(10):
   for j in range(10):
      if somecondition:
          continue

--> here I want to continue the loop with for i in range(10), not the j loop. Is there any way I can do that?

Zois Tasoulas
  • 1,242
  • 1
  • 11
  • 23
Cody Tang
  • 3
  • 1

1 Answers1

0

You can use break to exit the nested loop. For example

for i in range(10):
   for j in range(10):
      if somecondition:
          break
Zois Tasoulas
  • 1,242
  • 1
  • 11
  • 23