To add a new element to a list we use which command ?
A. list1.add(5)
B. list1.append(5)
C. list1.addLast(5)
D. list1.addEnd(5)
Answer:A
To add a new element to a list we use which command ?
A. list1.add(5) B. list1.append(5) C. list1.addLast(5) D. list1.addEnd(5)
Explanation:We use the function append to add an element to the list. 7. To insert 5 to the third position in list1, we use which command ?