how to tell python to go back to a previous line

Solutions on MaxInterview for how to tell python to go back to a previous line by the best coders in the world

showing results for - "how to tell python to go back to a previous line"
Raphael
19 Jan 2019
1def main(): #defines the area in indents that will be triggered with main()#
2print('hi')
3yn = input('Wanna loop back to the start? ')
4if yn = 'yes':
5main() #loops back to where we defined main#
6main() #This starts the main loop, without this, main would just be defined but not run#
Francesco
02 Mar 2020
1'There is no answer'