I want to print a message one letter at a time waiting a little bit in between each letter for that cool effect. I figured that I would be able to use a variable that stores my message and a for loop that iterates through and prints the characters. Here's what I came up with:
import time
message = "Hello fellow human"
interval = 0.1
# print each letter one at a time
for letter in message:
# print the letter
print(letter, end='')
# wait interval seconds
time.sleep(interval)
# print a newline at the end of the message
print()
The problem is that when I run the code, nothing gets printed for a couple of seconds, and then all of the sudden, the whole message appears at once. Do any smart people know what is going on?? Thanks for the help!