0

Its a random thought. I want to take an input and print the next statement on the same line of input, eg:
Enter you value: 5 _ you have entered the value 5

The code can be something like this:

a = input("Enter you value: ", end='\t')
print("you entered the value" ,a)

The problem is input doesn't have the 'end' parameter and always shifts you to the next line. Is there any way to achieve this (using backspace escape sequence perhaps)?
Again the output I expect is:

  1. Enter you value:
  2. Enter you value: 5
  3. Enter you value: 5 _ you have entered the value 5
dzart
  • 80
  • 7
MaT4X
  • 23
  • 5
  • `input` isn't moving to the next line, *the user pressing enter* is. – hobbs May 21 '21 at 15:08
  • 1
    The answer you were given is still valid. – Kemp May 21 '21 at 15:09
  • the already answered question will still give you the solution you're looking for, unless you're not searching for someone to complete your code. – dzart May 21 '21 at 15:12
  • To hobbs: so what can be another method to register my input if I don't want an enter – MaT4X May 22 '21 at 08:55
  • to dzart: firstly the question is not answered, the post form 10 years ago that i was linked to said its not possible. My side of argument is: I asked a question whose solution wasn't available->i posted a question->they removed it saying answered not possible 10 years ago->i say different versions so any new methods developed? Also my question has like 3 lines of code, you can't complete cause it there is nothing to complete there... – MaT4X May 22 '21 at 08:59
  • If a solution EXISTS, please link it in your comment – MaT4X May 22 '21 at 09:00
  • Also, do read the solution linked there before commenting (The given solution uses 'raw_input()' , that function doesn't even exists in python 3.x – MaT4X May 22 '21 at 09:01

0 Answers0