Advertisements
Advertisements
Question
Consider the following list myList. What will be the elements of myList after the following operation:
myList = [10,20,30,40]
myList.extend([80,90])Short/Brief Note
Advertisements
Solution
extend() function takes a list as an argument and appends each element of the list in the same order. The final output will be: [10, 20, 30, 40, [50, 60], 80, 90].
shaalaa.com
Lists Methods and Built-in Functions in Python
Is there an error in this question or solution?
