I want to make typewritter effect with delay between each character.
However my problem is when I put a variable between the text it doesn't work.
import sys,time
message = "What's your name?\n"
def typewritter(message):
for char in message:
sys.stdout.write(char)
sys.stdout.flush()
if char != ("\n"):
time.sleep(0.1)
else:
time.sleep(1)
typewritter(message)
name = str(input(''))
namehello = ("Hello ",name, " I'm .........")
typewritter(namehello)
the first part works but not the second, anyone knows how?.