0
How do I reference an old line?
I am new to python, and I can't figure out how to run a previous line ( ex. run line 7 from line 20). it is like the "goto" function in cmd.
2 odpowiedzi
+ 1
Make line 7 a function and call it from line 20 or have line 20 end your loop restarting it at line 7
Goto is a very poor way to code Python and it is very much not recommended.. That said, who am I to tell you what you should do with your codes.. a quick search lead me to a Python module that does what you want.. It was designed as an April fool's joke, but It appears it is a real thing and actually functions as goto.
http://entrian.com/goto/
+ 1
complete the python tutorial, you will learn more about loops and functions etc.
you will get the info you need