Concerned_Citizen
Concerned_Citizen

Reputation: 6835

Allow User Input Without Moving to New Line - Python 2.7

How can I let user enter in a value right after a string? For example, I want the user to be able to enter in a value after this string on the same line "Please enter in the length of the first side: ". However, the raw_input() function starts at a new line. How can I continue on the same line?

Upvotes: 1

Views: 135

Answers (1)

Cody Piersall
Cody Piersall

Reputation: 8547

raw_input takes an argument. So just do

raw_input('Please enter in the length of the first side: ')

and the user will be prompted to input right after the colon.

Upvotes: 1

Related Questions