Skip to content
Advertisement

Python 3: How do I add input and a string to the same line?

I have to put the input on the same line as the string and can’t figure out how. Here’s the code:

JavaScript

Advertisement

Answer

The function input() takes in a string to print so you can do this:

JavaScript

And it will print the string before taking input without adding a newline

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement