Skip to content

Instantly share code, notes, and snippets.

@rcampbell
Created March 7, 2010 10:21
Show Gist options
  • Save rcampbell/324297 to your computer and use it in GitHub Desktop.
Save rcampbell/324297 to your computer and use it in GitHub Desktop.
Code Golf - 99 Bottles Of Beer
print "\n\n".join(["%d %s of beer on the wall, %d %s of beer.\n%s"%(i,i>1 and"bottles"or"bottle",i,i>1 and"bottles"or"bottle",i-1==0 and"Go to the store and buy some more, 99 bottles of beer on the wall."or"Take one down and pass it around, %d %s of beer on the wall."%(i-1,i-1>1 and"bottles"or"bottle"))for i in reversed(range(1,100))])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment