Created
November 27, 2017 20:18
-
-
Save estevaofon/0df1399a830ceb0868fbf75384b1e7b3 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 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