Skip to content

Instantly share code, notes, and snippets.

@alexmojaki
Created May 26, 2016 18:39
Show Gist options
  • Save alexmojaki/8a4ba43e66ee78a99b8435e05818a3e3 to your computer and use it in GitHub Desktop.
Save alexmojaki/8a4ba43e66ee78a99b8435e05818a3e3 to your computer and use it in GitHub Desktop.
Simple Zalgo text generator in Python where the Zalgoness increases with each word.
from random import choice
marks = map(unichr, range(768, 879))
string = 'clear the current exception in between your catch and the bare raise OH GOD NO EVENTLET IT COMES'
words = string.split()
print(' '.join(''.join(c + ''.join(choice(marks)
for _ in range(i // 2 + 1)
) * c.isalnum()
for c in word)
for i, word in enumerate(words)))
@esnosy
Copy link

esnosy commented May 22, 2024

from random import choice
marks = list(map(chr, range(768, 879)))
string = 'clear the current exception in between your catch and the bare raise OH GOD NO EVENTLET IT COMES'
words = string.split()
print(' '.join(''.join(c + ''.join(choice(marks)
                                   for _ in range(i // 2 + 1)
                                   ) * c.isalnum()
                       for c in word)
               for i, word in enumerate(words)))

I don't remember writing this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment