Skip to content

Instantly share code, notes, and snippets.

@theelous3
Created July 15, 2020 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theelous3/9747a406540304adb95f1276166b244c to your computer and use it in GitHub Desktop.
Save theelous3/9747a406540304adb95f1276166b244c to your computer and use it in GitHub Desktop.
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