10 or more phones order

Federico Lorenzi florenzi at gmail.com
Mon Apr 28 22:45:55 CEST 2008


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 :)

Cheers,
Federico
On 4/28/08, Ilja O. <vrghost at gmail.com> wrote:
> >
> >  So why's it not in Perl then,
> >  You could do all that in a simple one-liner...
> >
> >  ;o)
> >
> >
>
> I don't know Perl :(
> But I could try to write on z/OS HLASM. Or Erlang...
>
> Btw, it could be simple one-liner in Python too.
> Like this:
>   phone_count = 42
>   _orders = ["BOX" for _i in xrange(phone_count // 10)] + ["SINGLE"
> for _i in xrange(phone_count % 10)]
>   print("Please, order %s" % ", ".join(_orders))
>
> Or if you want REALLY python one-liner:
>
> exec("eJwryMjPS41Pzi/NK1GwVTAx4orPL0pJLSoGcqKVnPwjlBTS8osU4jMVMvMUKooS89JTNQqQtOjrKxgaaMYqaANVB3v6ufu4EtCgClbPVVCUmVeioRSQk5pYnKqjALZTQbVYCSivpKOgpJeVn5mnAXWKpiYAGp0z4g==".decode("base64").decode("zip"))
>
> _______________________________________________
> Openmoko community mailing list
> community at lists.openmoko.org
> http://lists.openmoko.org/mailman/listinfo/community
>




More information about the community mailing list