10 or more phones order

Ilja O. vrghost at gmail.com
Tue Apr 29 14:52:36 CEST 2008

On Mon, Apr 28, 2008 at 11:45 PM, Federico Lorenzi <florenzi at gmail.com> wrote:
> Haha, one of the bests laughs I've had on here! Although I'm pretty
>  sure it violates PEP 346356 which clearly states that thou should not
>  use exec and base64 :)

If you think that python one-liner without base64 is better, here it is:

(lambda f=(lambda n, v: globals().update({n: v})): f("set", f))() or
set("wr", lambda v:
__import__("sys").stdout.write(str(v).strip()+"\n")) or
set("phone_count", 42) or wr("Please order %s" % ", ".join(["BOX" for
_i in xrange(phone_count // 10)] + ["SINGLE" for _i in
xrange(phone_count % 10)]))

Have a nice day. ;)

More information about the community mailing list