Word Prompt : Building Vocabulary one day at a time

Let Python do the thinking for you 🙂

I wanted a way to generate five words, out of the blue with their meaning so that I didn’t have to think about “which five words I use in todays article”

Decision Fatigue is a thing, and I want to avoid making any of these decisions.

I started by creating list of GRE words saved in words.txt and meaning saved in meaning.txt and then randomly picked out a pair of them

import random

def pick(wordfile = 'words.txt', meaningfile = 'meanings.txt', n=5):
    wordlist = [line.rstrip('\n') for line in open(wordfile)]
    meaninglist = [line.rstrip('\n') for line in open(meaningfile)]
    dictionary = {wordlist[i]: meaninglist[i] for i in range(len(wordlist))} 
    output = random.choices(list(dictionary.items()), k=n)

out = pick()
for i in range(len(out)):
    print(f"- {out[i][0].title()}\t{out[i][1].title()}")

Nothing really complicated, just a tool to help me with building my vocabulary 🙂

Word Prompt

Generate Random words with meaning that have to be used in the article that I write. Helps with my shitty vocabulary, takes away the decision fatigue of selecting the word. You can check out the implementation and read more about it here 

More on Not helpful Writing and Self Improvement? You can also check out more about things I do with python !

2 thoughts on “Word Prompt : Building Vocabulary one day at a time

Leave a Reply

%d bloggers like this: