Last active
May 7, 2022 18:08
-
-
Save andrewdanks/4099093 to your computer and use it in GitHub Desktop.
"Cool story, bro" alternatives
This file contains 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
from itertools import product | |
from random import choice | |
# Cool story, bro. alternatives | |
# by @andrewdanks | |
# Prints all combinations iff True; prints a random sentence otherwise. | |
print_all_combos = False | |
story_adjectives = ['intriguing', 'riveting', 'gripping', 'fascinating', 'compelling', 'charming', 'dazzling'] | |
story_nouns = ['adventure', 'story', 'tale', 'anecdote', 'saga', 'fable', 'parable', 'exemplum', 'discourse'] | |
person_nouns = ['chap', 'lad', 'fella', 'sir', 'brethren', 'comrade', 'mate', 'chum'] | |
format_sentence = lambda adj, noun, pronoun: '%s %s, %s.' % (adj.capitalize(), noun, pronoun) | |
if print_all_combos: | |
combos = product(story_adjectives, story_nouns, person_nouns) | |
for sentence in combos: | |
print format_sentence(sentence[0], sentence[1], sentence[2]) | |
else: | |
print format_sentence(choice(story_adjectives), choice(story_nouns), choice(person_nouns)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment