This question already has answers here:
Closed 4 years ago.
I am doing the following in Python2.7:
>>> a = [1,2,3,4,5]
>>> b = [2,1,3,4]
>>> c = [3,4]
>>> map(None, a, b, c)
[(1, 2, 3), (2, 1, 4), (3, 3, None), (4, 4, None), (5, None, None)]
I am trying to do something similar in Python3
>>> a = [1,2,3,4,5]
>>> b = [2,1,3,4]
>>> c = [3,4]
>>> map(None, a, b, c)
<map object at 0xb72289ec>
>>> for i,j,k in map(None, a, b, c):
... print (i,j,k)
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'NoneType' object is not callable
How do I replicate the Python2 results in Python3?