Say I want to print 0
through 9
.
I type in for i in range(10): print(i)
, press enter, and terminal shows ...
, waiting for further statements.
So I have to press enter again to have the numbers printed.
>>> for i in range(10): print(i)
...
How can I have the number printed without having to press enter twice?
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)")
"alt+enter" I was working in ipython and facing the same problem as yours. upon trying various combinations from keyboard, this one finally worked
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With