Question: Assume the following statement appears in a program: names = [ ] Which of the following statements would you use to add the string Wendy
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')
Step by Step Solution
3.42 Rating (152 Votes )
There are 3 Steps involved in it
You would use statement b ... View full answer
Get step-by-step solutions from verified subject matter experts
