Skip to content

Instantly share code, notes, and snippets.

@matthewpoer
Created January 26, 2024 18:38
Show Gist options
  • Save matthewpoer/5b9bccd93646e50c9824e93c4ad708eb to your computer and use it in GitHub Desktop.
Save matthewpoer/5b9bccd93646e50c9824e93c4ad708eb to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
import requests
f=o=i=p=""
while not (f and o and i and p):
for word in requests.get("https://random-word-api.herokuapp.com/word?lang=en&number=50").json():
if word[0] == "f":
f = word
if word[0] == "o":
o = word
if word[0] == "i":
i = word
if word[0] == "p":
p = word
print(f"{f} {o} {i} {p}".title())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment