Or is that part of the meaning of zip() - to return an interleaved list?Yup, it zips 2 lists together, much like the zipper on a real world zip interleaves the teeth of the zip together :) I've just used a hash there as that was the shortest way I could think of interleaving two lists, even though it might not be the best way (doesn't check for the length of the lists for starters).
_________
broquaint
In reply to Re: Re: a little zip()
by broquaint
in thread a little zip()
by broquaint
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |