1.

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)The question was asked in my homework.I would like to ask this question from Lists topic in chapter Lists & List Comprehension of Python

Answer» RIGHT CHOICE is (b) list1.append(5)

For EXPLANATION: We use the FUNCTION append to add an element to the list.


Discussion

No Comment Found

Related InterviewSolutions