slow print python
import sys
import time
def slowprint(s):
for c in s + '\n':
sys.stdout.write(c)
sys.stdout.flush()
time.sleep(1./10)
slowprint("this this writen slowly in my terminal")
4.2
10
def slowPrint(string):
for char in range(len(string)):
print(string[char], end="")
#time.sleep(x) can be used for a longer wait but is not needed...
#for a noticable reduction in output speed
print("")
Thank you!
10
0
Are there any code examples left?
New code examples in category Python