I'm looking to create a little game in Python 3 where, when you answer the question with an input, the code automatically adds something right after you on the same line :
1 print("Francis - Hello Stranger ! What's your name ?")
2 name = input("??? - My name is ")
3 print(f"Francis - Oh, hello {name}. You need to go South.")
So here, I'll just write my name "Arnaud" and I would like that the program adds automatically the sentence ("and I need to go in town.") right after "Arnaud" in line 2 (after my input).
It should looks like:
1 Francis - Hello Stranger ! What's your name ?
2 ??? - My name is ***Arnaud*** and I need to go in town. #Here, I just write my name "Arnaud"
3 Francis - Oh, hello Arnaud. You need to go South.
But I don't understand how to add an string or else right after an input on the same line. I tried with the print("Something", end="") fUnction but didn't work.
1 print('The cat do "Mi-', end="")
2 print('AOU!"')
3
4 print('I\'am thinking of : ', end="")
5 internalThought = input ("", end="")
6 print(".")