0

I want to print and input in the same line in python. But I don't need a print then multi input. Example : I want to see them on the command screen:

Coordinates : X = 52 "<ENTER>" Y = 964 "<ENTER>" Z = 651

Enter key will be pressed after entering each coordinate. will request the next coordinate on the same line.

Actually, I want the following operations to be done in one line.

print('Coordinates : X') = input() , print('Y') input(), print('Z') input()

i tried it. But i don't want it. I need, firstly print('Coordinates X :') then input to a variable. print('Y :') then input to other variable. print('Z:') then input to another varible. but all this commands must be same line.

enter image description here

Thank you, Best Regards!

1 Answers1

0

You can try something like

print("Coordinates:  X = {0}, Y = {1}, Z = {2}".format(input(), input(), input()))