>>> a = list('asdfg')
>>> map(None, a[::2], a[1::2])
[('a', 's'), ('d', 'f'), ('g', None)]
>>> a = list('asdfgh')
>>> map(None, a[::2], a[1::2])
[('a', 's'), ('d', 'f'), ('g', 'h')]
>>>
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to