2

Is there a way to format the input field above the options?

Currently,

abc = input('choose an option: \n 1 \n 2 \n')

results in:

choose an option:
1
2
X

with X being where the input will appear. Is there any way to make it like this:

choose an option: X
1
2

so that the input appears in the first line of the prompt?

Mateen Ulhaq
  • 24,552
  • 19
  • 101
  • 135
weasel
  • 534
  • 1
  • 5
  • 18

0 Answers0