129k views
5 votes
Write a small program that creates a list called dogs and stores the values "Rex", "Spike", and "Spot". At the end of the app, write code that replaces "Rex" with "Fives".

2 Answers

0 votes

Final answer:

To create the list 'dogs' and replace a value in Python

Step-by-step explanation:

To create the list 'dogs', you can use Python programming language. Here is the code for creating the list with the values 'Rex', 'Spike', and 'Spot':

dogs = ['Rex', 'Spike', 'Spot']

To replace the value 'Rex' with 'Fives', you can use index assignment. Here is the code for replacing 'Rex' with 'Fives':

dogs[0] = 'Fives'

User Pietroppeter
by
4.8k points
7 votes

Answer:

vrul (red lidtv dog ); it's in jv

User WNRosenberg
by
4.8k points