interesting exercise

castironpi at gmail.com castironpi at gmail.com
Tue May 8 17:55:05 EDT 2007


On May 8, 3:55 pm, James Stroud <jstr... at mbi.ucla.edu> wrote:
> Steven D'Aprano wrote:
> > On Tue, 08 May 2007 10:22:05 +0000, James Stroud wrote:
>
> >>This takes annoying past annoying to some new level of hell to which
> >>even satan himself wouldn't venture.
>
> > And thank you for sharing that piece of spam with us again. It was so much
> > less enjoyable to see it the second time.
>
> > Seriously James, with more and more people using automated spam filters,
> > it might not be such a wise idea to keep having your name associated with
> > spam content.
>
> Thank you for the tip.
>
> James

We also have:

p=lambda a,n: [ ''.join( y ) for y in eval('[%%s %s]'%' '.join(['for x
%i in a'%i for i in range(n)]) %'(%s)'%','.join(['x%i'%i for i in
range(n)]) ) ]
p('abc',2)
#fb: ['aa', 'ab', 'ac', 'ba', 'bb', 'bc', 'ca', 'cb', 'cc']
len(p('13579',3))
#fb: 125
edit()

File under obscurities. acb




More information about the Python-list mailing list