Re: [Tutor] Beer Bottles

2006-07-06 Thread Terry Carroll
On Thu, 6 Jul 2006, Alan Gauld wrote: > Not very obfuscated though... For *true* obfuscation, nothing matches perl: cut here -- ''=~('(?{'.('`'|'%').('['^'-') .('`'|'!')

Re: [Tutor] Beer Bottles

2006-07-06 Thread Alan Gauld
> for i in range(100,0,-1): > print > print "Go to the store, buy some more" > > I'm curious to know other ways to handle this - could it be done > functionally? How could we obfuscate this (not that we'd want to in > real life)? Or make it a (close to) one liner? print "".join(['%s bottles of

Re: [Tutor] Beer Bottles

2006-07-06 Thread Luke Paireepinart
Steve Nelson wrote: > A bunch of my friends and I have been chatting about "99 bottles of > beer" - and how to make the shortest code to do it. I have: > > for i in range(100,0,-1): >print "%s bottles of beer on the wall, %s bottles of beer\nTake on > down, pass it around.."%(i,i) > print "Go