Why do I get in Python2
>>> map(max,[1,2],[3,1])
[3, 2]
and in Python3
>>> map(max,[1,2],[3,1])
<map object at 0x10c2235f8>
?
What should replace map(max,[1,2],[3,1])
in Python3 ?
I read that one should use list comprehension in Python3 but
>>> [max(i,j) for i in [1,2] for j in [3,1]]
[3, 1, 3, 2]
does not give the desired result and neither do the variations that came to mind.