Skip to content

Instantly share code, notes, and snippets.

@soupglasses
Last active June 16, 2020 23:54
Show Gist options
  • Save soupglasses/dd7db05630e466847dbde86f6f38613e to your computer and use it in GitHub Desktop.
Save soupglasses/dd7db05630e466847dbde86f6f38613e to your computer and use it in GitHub Desktop.
Challenge: Print baby shark with less than 300 characters of code.
def baby_shark_lyrics():
a,o=[],''
for s in 'Baby Mommy Daddy Grandma Grandpa'.split():
a+=[s+" shark"]
a+=["Let's go hunt"]
for i in a:
o+=(i+","+" doo"*6+"\n")*3+i+"!\n"
return o+'Run away,…'
print(baby_shark_lyrics())
@soupglasses
Copy link
Author

soupglasses commented Jun 16, 2020

Fun fact. The size of the script is only ~30% of the actual lyrics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment