Assume the following statement appears in a program: names = [ ] Which of the following statements
Question:
Assume the following statement appears in a program:
names = [ ]
Which of the following statements would you use to add the string ‘Wendy’ to the list at index 0? Why would you select this statement instead of the other?
a. names[0] = 'Wendy'
b. names.append('Wendy')
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Question Posted: