Skip to content

Instantly share code, notes, and snippets.

@mei-li
Created October 10, 2016 22:00
Show Gist options
  • Save mei-li/bb52e6ab623c77c8e9f9c3e891675618 to your computer and use it in GitHub Desktop.
Save mei-li/bb52e6ab623c77c8e9f9c3e891675618 to your computer and use it in GitHub Desktop.
Create hidden message in lowercase.
"""
Create hidden message in lowercase.
"""
import string
import random
def random_text(size):
chars = string.ascii_uppercase + string.ascii_lowercase + string.punctuation + string.digits
return ''.join([random.choice(chars) for i in xrange(size)])
def riddleit(secret):
message = []
secret = ''.join(secret.split()).lower()
for ch in secret:
message.append(random_text(random.randint(100, 400)).upper())
message.append(ch)
message.append(random_text(random.randint(100, 400)).upper())
return ''.join(message)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment