python - Take input without changing the line -


print("please enter:") x = input() print(x) 

in console after "please enter:" printed line changes. want should able provide input in same line of "please enter:". there method prevent change of line?

instead of print(), use input() produce prompt:

x = input("please enter: ") 

from input() function documentation:

input([prompt])

if prompt argument present, written standard output without trailing newline.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -