Created
July 15, 2020 14:46
-
-
Save theelous3/9747a406540304adb95f1276166b244c to your computer and use it in GitHub Desktop.
This file contains hidden or 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 json | |
from random import sample | |
_ALL_WORDS = [] | |
with open("words.json", 'r') as word_file: | |
word_dict = json.load(word_file) | |
for key, word_list in word_dict.items(): | |
_ALL_WORDS.extend(word_list) | |
def make_word_clump(count=4): | |
clump = [word.title() for word in sample(_ALL_WORDS, count)] | |
return ''.join(clump) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment