in reply to a little zip()

How about returning a reference instead? Its lighter weight and can actually be treated as a hash without having to be assigned into one. Or is that part of the meaning of zip() - to return an interleaved list?

Replies are listed 'Best First'.
Re: Re: a little zip()
by broquaint (Abbot) on Apr 10, 2003 at 15:32 UTC
    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).
    HTH

    _________
    broquaint