Question: Assume the following statement appears in a program: mylist = [ ] Which of the following statements would you use to add the string 'Labrador'
Assume the following statement appears in a program:
mylist = [ ]
Which of the following statements would you use to add the string 'Labrador' to the list at index 0?
a. Mylist[0] = 'Labrador'
b. Mylist.insert(0, 'Labrador')
c. Mylist.append('Labrador')
d. Mylist.insert('Labrador', 0)
Step by Step Solution
3.40 Rating (153 Votes )
There are 3 Steps involved in it
The correct statement to add the string Labrador to the list at index 0 i... View full answer
Get step-by-step solutions from verified subject matter experts
