मराठी

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]) - Computer Science (Python)

Advertisements
Advertisements

प्रश्न

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])
टीपा लिहा

उत्तर

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
List Methods and Built-in Functions
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 9: Lists - Exercise [पृष्ठ २०४]

APPEARS IN

एनसीईआरटी Computer Science [English] Class 11
पाठ 9 Lists
Exercise | Q 2. ii. | पृष्ठ २०४
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×