[Tutor] a little loop
Jim Mooney
cybervigilante at gmail.com
Wed May 29 07:58:34 CEST 2013
On 28 May 2013 22:33, Andreas Perstinger <andipersti at gmail.com> wrote:
> Wow, that means I can do this: print ''.join('But this parrot is dead!')
>>
>
> But why do you want to do that?
>
Actually, I meant to do this:
print ''.join(' '.join('But this parrot is dead'.split()))
Which has the same effect.
There is an autodidactic purpose. I kept confusing the join statement by
putting the joined string first, them the joiner, bur fooling around like
this solidifies things in my mind ;')
Jim
Ornhgvshy vf orggre guna htyl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130528/f2dfd4c8/attachment.html>
More information about the Tutor
mailing list