I am a python newbie and have been asked to carry out an exercise: make a program loop until exit is requested by the user hitting <Return>
only. So far I have:
User = raw_input('Enter <Carriage return> only to exit: ')
running = 1
while running == 1:
... # Run my program
if User == # Not sure what to put here
break
I have tried: (as instructed in the exercise)
if User == <Carriage return>
and also
if User == <Return>
but this only results in invalid syntax.
How do I do this in the simplest way possible?