I know of the print_slow function to make a print looks like a human typing. however, how can i make it print out instantly or skip the slow typing to show the print immediately by pressing a key or enter?
import sys,time,random
def print_slow(str):
for letter in str:
sys.stdout.write(letter)
sys.stdout.flush()
time.sleep(0.05)
print_slow("Type something here slowly")
I have a sample code above, would anyone help me out?