Skip to content

Instantly share code, notes, and snippets.

@ahmed4end
Created July 22, 2019 16:37
Show Gist options
  • Save ahmed4end/eb2aa1b7ae6ef35ee84a9dae5e828543 to your computer and use it in GitHub Desktop.
Save ahmed4end/eb2aa1b7ae6ef35ee84a9dae5e828543 to your computer and use it in GitHub Desktop.
import re, random, sys, time
text = "Hello, World!, this message should be printed in a cool way xD"
def CS_Printing2(text):
text = list(text)
letters = [chr(i) for i in range(65, 91)] + [chr(i) for i in range(97, 123)]
res = ["".join(text)]
for i in range(len(text)+5):
for i in range(random.randint(0, 3)):
text[random.randint(0, len(text)-1)] = random.choice(letters)
res.append("".join(text))
for i in res[::-1]:
sys.stdout.write("\r" + i)
sys.stdout.flush()
time.sleep(1/99)
CS_Printing2(text)
time.sleep(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment