import sys, time
def typing(text):
for character in text:
sys.stdout.write(character)
sys.stdout.flush()
time.sleep(0.05)
typing("Hello _ World !!")
Run this code online : Python Editor
For people who want to learn & understand what is happening in the code , here is line by line explaination !
1. import sys, time
[+] More about : import , sys , time
3. def typing(text):
[+] More about : def
4. for character in text:
[+] More about : for loop
5. sys.stdout.write(character)
6. sys.stdout.flush()
[+] More about : sys.stdout.write() , sys.stdout.flush()
7. time.sleep(0.05)
[+] More about : time.sleep()
9. typing("Hello _ World !!")
[+] More about : calling function