0

We can use goto and :label in batch. Is there anything like it in Python?

Remi Guan
  • 21,506
  • 17
  • 64
  • 87

1 Answers1

0

No, there is no goto or label or other equivalent in vanilla python.

Your best bet is to stick with regular control flow statements (e.g. if, else if, else, for, while, break, continue, ...) and functions (which add return to the list of control flow statements as well ...)

mgilson
  • 300,191
  • 65
  • 633
  • 696