Created
January 16, 2019 17:17
-
-
Save recklessop/9fdb716dfc890f77bb64dc3bca781959 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys,time,random | |
def print_slow(str): | |
for letter in str: | |
sys.stdout.write(letter) | |
sys.stdout.flush() | |
time.sleep(0.1) | |
print_slow("Type whatever you want here") |
i found how to do it:
"""
def slowType(self, text):
typing_speed = 50
for char in text:
print(char, end='', flush=True)
time.sleep(10.0/typing_speed)
"""
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hi, i want to find a way to use a normal print statement like this:
"""
def type(text, typing_speed):
for char in text:
print(char, end='')
time.sleep(10.0/typing_speed)
print('\n')
"""
could you maybe try to help me?
and also i would recommend after the for loop to put a print statement so i goes into the next line.