João Fróis
João Fróis

Reputation: 89

How do i make input's line be below the printed line?

This is what i have:

choice = int(input("Choose an action")) - 1

In the console it appears like this:

Choose an action(The user input goes here)

What i want is:

Choose an action
(the user input goes here)

Upvotes: 1

Views: 577

Answers (2)

Dadep
Dadep

Reputation: 2788

just do :

print("Choose an action")
choice = int(input()) - 1

Upvotes: 3

Djaouad
Djaouad

Reputation: 22794

You can either print the message, which will automatically add a newline:

print("Choose an action")
choice = int(input()) - 1

Or include a newline (\n) manually at the end of the input message:

choice = int(input("Choose an action\n")) - 1

Upvotes: 4

Related Questions