noun = ["Christmas", "holiday", "entertainment", "Python", "neighbor", "computer", "hologram", "reindeer", "sleigh", "jar", "stock", "picture", "galaxy"]
verb = ["killing", "finding", "riding", "seeking", "coding", "wiping", "opening", "creating", "deleting", "ending", "playing", "saying", "elating", "striking"]
adjective = ["good", "bad", "evil", "beautiful", "ugly", "angry", "agitated", "frustrated", "elegant", "festive", "cheerful", "elevated", "moody"]
adverb = ["surprisingly", "severely", "coolly", "quickly", "scarily", "often", "irritatingly", "probably", "only", "searingly", "painfully", "joyfully"]
import random
f = open("madlibs.txt", "w+")
f.writelines([f"A long time ago in a {random.choice(noun)} far, far away....\n",
f"It was a(n) {random.choice(adjective)} {random.choice(adjective)} day in April, and the {random.choice(noun)}s were {random.choice(verb)} thirteen.\n",
f"The {random.choice(adjective)} {random.choice(noun)} named {random.choice(noun)} was {random.choice(adverb)} {random.choice(verb)}, surprisingly enough. ",
f"We musn't be {random.choice(verb)} them for this, for they are a quite a {random.choice(adjective)} character. But as {random.choice(noun)} is {random.choice(adverb)} {random.choice(verb)} them, the heroic {random.choice(noun)} {random.choice(adverb)} ends up {random.choice(verb)} both of them, ending a {random.choice(adjective)} era for the galaxy."
])
f.seek(0)
print(f.read())