Skip to content

Instantly share code, notes, and snippets.

@Sorseg
Last active August 29, 2015 14:04
Show Gist options
  • Save Sorseg/565de85ed10d184e1383 to your computer and use it in GitHub Desktop.
Save Sorseg/565de85ed10d184e1383 to your computer and use it in GitHub Desktop.
""" Thanks to http://speakrus.ru/dict/ """
import random
f = open('pldf-win.txt', encoding='cp1251')
words = f.read().split('\n')
def gen():
message = ' '.join(random.choice(words) for _ in range(random.randint(2, 6)))
message = message[0].upper()+message[1:]
message += random.choice(['!','?'])
return message
for i in range(20):
print(gen())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment