string bug/oddity?

Aahz Maruch aahz at panix.com
Mon Aug 13 00:13:38 EDT 2001


In article <3B77150B.9F8FC079 at engcorp.com>,
Peter Hansen  <peter at engcorp.com> wrote:
>
>Anything wrong with this, simpler, approach?
>
>>>> for x in a.keys():
>...     print '%s%s' % (x, a[x])

Even simpler and faster:

for x,y in a.items():
    print '%s%s' % (x,y)
-- 
                      --- Aahz  <*>  (Copyright 2001 by aahz at pobox.com)

Hugs and backrubs -- I break Rule 6                 http://www.rahul.net/aahz/
Androgynous poly kinky vanilla queer het Pythonista   

Internet $tartup$: Arbeit ueber alles  



More information about the Python-list mailing list