Exit while loop by user hitting ENTER key

前端 未结 14 1892
难免孤独
难免孤独 2020-12-08 23:01

I am a python newbie and have been asked to carry out some exercises using while and for loops. I have been asked to make a program loop until exit is requested by the user

14条回答
  •  渐次进展
    2020-12-08 23:42

    a very simple solution would be, and I see you have said that you would like to see the simplest solution possible. A prompt for the user to continue after halting a loop Etc.

    raw_input("Press to continue")
    

提交回复
热议问题