-1

I would like to know how two of map and lambda work together.

Given

x=[0,1,2,3,4]
y=[0,1,4,9,16]
z=map(lambda x, y:(x+y)**2,x,y)

I tried to use

[i for i in z]

or

print(z)

to show the contents in z

and hopefully I expect the result

something is like this

[0,4,36,144,400]

but nothing happens

What is valid syntax to show that?

Stats Cruncher
  • 143
  • 1
  • 1
  • 6

0 Answers0