[Tutor] Looking for a Pythonic way to pass variable

C Smith smichr at hotmail.com
Tue Mar 22 15:59:36 CET 2005


On Tuesday, Mar 22, 2005, at 05:01 America/Chicago, 
tutor-request at python.org wrote:

> I met a similar question.
> what if one has L = [[1,2],[3,4]], K = [100, 200]
> How to 'zip' a List like [[1,2,100], [3,4,200]]?
>
I would do something like:

###
for i in range(len(L)):
   L[i].append(K[i])
###

/c




More information about the Tutor mailing list