हिंदी

Consider the following list myList. What will be the elements of myList after the following operation: myList = [10,20,30,40] myList.append([50,60]) - 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.append([50,60])
टिप्पणी लिखिए

उत्तर

append() function takes only one argument and inserts the element to the end of the list. Here, the argument is a list containing the elements 50, and 60. Therefore, the output will be: [10, 20, 30, 40, [50, 60]].

shaalaa.com
List Methods and Built-in Functions
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 9: Lists - Exercise [पृष्ठ २०४]

APPEARS IN

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

Englishहिंदीमराठी


      Forgot password?
Use app×