Skip to content

Instantly share code, notes, and snippets.

@estevaofon
Created November 27, 2017 20:18
Show Gist options
  • Save estevaofon/0df1399a830ceb0868fbf75384b1e7b3 to your computer and use it in GitHub Desktop.
Save estevaofon/0df1399a830ceb0868fbf75384b1e7b3 to your computer and use it in GitHub Desktop.
import this
from time import sleep
import sys
import os
os.system('cls' if os.name == 'nt' else 'clear')
text = "".join([this.d.get(c, c) for c in this.s])
phrases = text.split("\n")
for item in phrases:
print(item, end="")
sys.stdout.flush()
sleep(1)
size = len(str(item))
print("\b"*size, end="")
print("\r", end="")
sys.stdout.write("\033[K") # Clear to the end of line
print()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment