Funkcja print() w python-ie domyślnie na końcu łańcucha tekstowego, który wypisuje wstawia "znak końca linii", wystarczy zmienić to, posługując się parametrem end funkcji print.
name = input ("What's your name? ")
print ("Hi", name, "how do you do.")
print("How old are you", name, "? ", end="")
age = input()
. . .
idąc tym tropem (no i w oparciu o drugi obrazek) uporządkowałbym kod tak
print("What's your name? ", end="")
name = input()
print("Hi", name, "how do you do.", sep=", ")
print("How old are you, ", name, "? ", sep="", end="")
age = input()
print("Great, ", name, ", I'm ", age, " years old too.", sep="")
print("Which city do you come from, ", name, "? ", sep="", end="")
city = input()
print("What a coincidence, I am from", city, "too.")
print(name, "here is your record ....", sep=", ")
print("NAME AGE CITY")
print("---------------------")
print(name, age, city, sep="\t")

Od wersji Python-a 3.6+, można to zapisać trochę bardziej intuicyjnie (bez tego "oczopląsu", z tym sep i end - Formatted string literals)
print("What's your name? ", end="")
name = input()
print(f"Hi, {name}, how do you do.")
print(f"How old are you, {name}? ", end="")
age = input()
print(f"Great, {name}, I'm {age} years old too.")
print(f"Which city do you come from, {name}? ", end="")
city = input()
print(f"What a coincidence, I am from {city} too.")
print(f"{name}, here is your record ....")
print("NAME AGE CITY")
print("---------------------")
print(name, age, city, sep="\t")
What is print in Python?
print in Python is the standard function used to print the output to the console. The syntax of this function is as follows:
SYNTAX:
print(value1, value2, …, sep = ‘ ‘ , end = ‘ n ‘, file = sys.stdout, flush = False)
The parameters and their descriptions are as follows:
