Computer Science, asked by mustufaansari2962, 9 days ago

consider the following list mylist. what will be the elements of my list after each of the following operation
my list=(10, 20,30,40)
(a) my list. append([50, 60}(b) my list. extend([80, 90])​

Answers

Answered by sonalminz
21

Answer:

i. output is = [10,20,30,40,[50,60]]

append() will result in the list being added as the element of the original list.

ii. output = [10,20,30,40,80,90]

extend() will add all the items from the argument list (here [80,90]) to the original list as an element not as list.

I hope this will help you

Similar questions