So I have problems with Python. I have a code that:
import time
def printChat(string, sleepTime):
for a in string:
print (a, end="")
time.sleep(sleepTime)
print()
When I do printChat ("Hello", 0.1), it should print a letter and wait 0.1 seconds, then print the next one, but instead it will wait 0.5 seconds (since " hello " is 5 characters) and then print hello suddenly. Any idea why this is?
source
share