Python Zip() Two Lists
I'm trying to zip two lists with the same length, but I always get the error 'zip object at 0x0000000002A81548' instead of a zipped list. filename = input('Which file do you want t
Solution 1:
movielist= list(zip(moviename,moviedate))
In Python 2 zip
returns a list and the above is not needed. In Python 3 it returns a special lazy zip object, similar to a generator or itertools.izip
, which you need to make concrete to use len
. The same is true for map
.
Post a Comment for "Python Zip() Two Lists"