Assume the following statement appears in a program: mylist = [ ] Which of the following statements
Question:
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)
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Question Posted: