Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Zen! solution in Creative category for I Love Python! by ale1ster
def i_love_python():
try:
#Override default print function and swap it
import builtins
keep, builtins.print = builtins.print, lambda s: ()
#Import zen module
zen_module = eval('__import__("this")')
#Decode the essense of python...
s = ''.join(zen_module.d.get(c, c) for c in zen_module.s)
#Share the wealth
keep(s)
except ImportError:
s = 'Well, what can you do? :-)'
return "I love Python!" or s
Aug. 18, 2014
Comments: