The equivalent of a GOTO in python [duplicate]
问题 This question already has an answer here: Is there a label/goto in Python? 17 answers I am self teaching myself python 2.7. I have some experience in using BATCH, which has a GOTO statement. How do I do that in python? For example, suppose I want to jump from line 5 to line 18. I realize there have been previous questions regarding this topic, but I have not found them sufficiently informative or, are too high level in python for my current understanding. 回答1: Goto s are universally reviled