Homework help
Grant Edwards
grante at visi.com
Tue Apr 1 14:28:32 EDT 2008
On 2008-04-01, Marc 'BlackJack' Rintsch <bj_666 at gmx.net> wrote:
>> Write a function zip(lst1, lst2) such that zip accepts two equal
>> length lists and returns a list of pairs. For example, zip(['a', 'b',
>> 'c'], [10, 20, 30]) should evaluate to the list [('a', 10), ('b', 20),
>> ('c', 30)].
>
> Hey not even a rebinding necessary. :-)
Yes it is.
The problem statement is "write a function" not "select an
existing standard library function" or "produce this answer in
the least number of lines of code".
--
Grant Edwards grante Yow! Will the third world
at war keep "Bosom Buddies"
visi.com off the air?
More information about the Python-list
mailing list