Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,13 @@
V template = <name> went for a walk in the park. <he or she>
found a <noun>. <name> decided to take it home.
F madlibs(template)
print("The story template is:\n"template)
V fields = sorted(Array(Set(re:<[^>]+>.find_strings(template))))
V values = input("\nInput a comma-separated list of words to replace the following items\n #.: ".format(fields.join(,))).split(,)
V story = template
L(f, v) zip(fields, values)
story = story.replace(f, v)
print("\nThe story becomes:\n\n"story)
madlibs(template)