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]
>>>
Answer :-
[1, 2, 3, '4', '5']
3
[1]
[4, 5, 6]
>>>
Isn't the answer to its third part is [1,3] ??
ReplyDeleteAll are correct. Please run the code in you pc.
DeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )