Q. Find the output of the following:


L1 = [1, 2, 3]

L2 = [4, 5, 6]

print (L1+ list ("45"))

print (L1.pop())

L1.remove (2)

print (L1)

L1.extend (L2)

print (L2)


Answer :-

[1, 2, 3, '4', '5']
3
[1]
[4, 5, 6]
>>>

2 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

  1. Isn't the answer to its third part is [1,3] ??

    ReplyDelete
    Replies
    1. All are correct. Please run the code in you pc.

      Delete

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post