Basically, after I have made an input, it prints the text on a new line. I want it to print the text after the user input on the same line. I don't want to get an input then print it back to the user, I want to just have an input that does nothing but lets the user type something. (I am new to python, so please keep it simple)
This is for a little choice game i'm making for fun. I've tried to do input("Blah", end = " ") but it just tells me input() takes no keywords.
import time
def type(str):
for letter in str:
print(letter, end='')
time.sleep(0.02)
type("My card number is ")
input()
time.sleep(0.5)
type(" and the expiry date is ")
input()
time.sleep(0.5)
type(". Finally,")
time.sleep(0.5)
type(" the three numbers on the back are ")
input()
print(".")
I wanted it to end up like this:
My card number is 1234 and the expiry date is 1234. Finally, the three
numbers on the back are 123.
Instead I got:
My card number is 1234
and the expiry date is 1234
. Finally, the three numbers on the back are 123
.