python how to repeat code

前端 未结 3 1030
灰色年华
灰色年华 2020-12-20 10:56

I am a very beginner in python and I want to repeat this code. But I dont\'t really know how to do this without \"goto\". I tried to learn about loops for hours but still n

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-20 11:08

    You can create a variable, and then say that as long as the variable is true to its value, to repeat the code in the for loop.

提交回复
热议问题