[Tutor] join question

Joel Goldstick joel.goldstick at gmail.com
Thu Oct 14 16:14:10 CEST 2010


On Thu, Oct 14, 2010 at 9:50 AM, Roelof Wobben <rwobben at hotmail.com> wrote:

>
>
> Hello,
>
> I found this answer to a problem for me :
>
>
> print ''.join([zf.getinfo('%s.txt' % p).comment for p in zpp])
>
> So I thought that this would be the same :
>
> for p in zpp:
>      test = zf.getinfo(p).comment
>      print ''.join(test)
>
> But it seems not to work
>
> Can anyone explain why not ?
>

the argument for getinfo() in the first case is a str(p) + ".txt"

in the second case it is just p

>
> Roelof
>
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
Joel Goldstick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20101014/3410e7d4/attachment.html>


More information about the Tutor mailing list