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
Post a Comment