Skip to content

Instantly share code, notes, and snippets.

@arnabanimesh
Created June 26, 2020 19:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arnabanimesh/0727af500d089fa6eb64da9f00d903e7 to your computer and use it in GitHub Desktop.
Save arnabanimesh/0727af500d089fa6eb64da9f00d903e7 to your computer and use it in GitHub Desktop.
Happy Birthday in python3
from time import sleep as z
def happy_birthday(name):
p, h = [print, 'Happy Birthday to']
d = (h, 'you')
happy = [d, d, (h, name.title()+"!"), d]
[p(' '.join(s)) or z(1) for s in happy]
p('Hip Hip Hooray\n' * 3)
happy_birthday(input('Enter name: '))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment