Skip to content
Sign upLog in
← Back to Community

Python Type Writer Effect

Profile icon
12608335

I DID NOT MAKE THIS
i found this code online somewhere i do not remember where and decided to share as it is very useful if you ant to make some type of text based game!

Voters
Profile icon
CalebSanchez1
Profile icon
OreOlad2
Profile icon
orangeofpain
Profile icon
tgz
Profile icon
kistecool
Profile icon
TheRicks2
Profile icon
12608335
Profile icon
Jjc1008
Profile icon
ranejeb
Profile icon
YodaCoder
Comments
hotnewtop
Profile icon
firefish

Here is my version:

import time def write(text): for char in text: print(char, end="", flush=True) time.sleep(0.1) print("\n")

It's a lot simpler

Profile icon
OreOlad2

This is so simple and yet really brilliant. Koodos to whoever thought of this on their own.
P.S. I like the use of the parameters, very cleaver.

Profile icon
12608335

@OreOlad2
Hope it helps!

Profile icon
THEJOEMAN23

Who wanna see my tthing

Profile icon
THEJOEMAN23

Cool

Profile icon
THEJOEMAN23

Nevermid it does

Profile icon
THEJOEMAN23

It does not work

Profile icon
RyanSwarbrick

k boomer

Profile icon
12608335

@RyanSwarbrick
oK BoOmEr

Profile icon
Pierce_Foley

You can do this a lot more simple with this:
from time import *

def typewrite(text):
i = 0
while(i < len(text)):
sleep(0.1)
print(text[i], end="")
i += 1
print()

typewrite("Hello World")

Profile icon
12608335

@Pierce_Foley Thanks!

Profile icon
theangryepicbanana

I'd ,much rather you make your own code, rather than using someone else's

Profile icon
danielutsch

seems like a good idea 8)

@theangryepicbanana

Profile icon
12608335

@theangryepicbanana
Sorry! i found it and thought people might like to know about it.