Python in terminal: how to signify end of for loop?
"alt+enter" I was working in ipython and facing the same problem as yours. upon trying various combinations from keyboard, this one finally worked
Just type the two returns and move on. But since you ask, this only needs one Enter:
exec("for i in range(10): print(i)")
You can use the Shift+Enter to end the function or loop which continues next line as below: