adplus-dvertising
frame-decoration

Question

What is the output of the following?
x = ['ab', 'cd']
print(list(map(len, x)))

a.

[‘ab’, ‘cd’].

b.

[2, 2].

c.

[‘2’, ‘2’].

d.

none of the mentioned

Posted under Python

Answer: (b).[2, 2].

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of the following?