adplus-dvertising
frame-decoration

Question

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

a.

[‘a’, ‘b’, ‘c’, ‘d’].

b.

[[‘ab’], [‘cd’]].

c.

[[‘a’, ‘b’], [‘c’, ‘d’]].

d.

none of the mentioned

Posted under Python

Answer: (c).[[‘a’, ‘b’], [‘c’, ‘d’]].

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?