>>> 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 - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
- Re: [Tutor] Group sequence pairwise Justin Ezequiel
- Re: [Tutor] Group sequence pairwise Christopher Arndt