Question: PYTHON Create a program that reverses the elements in a list. To do this, you will have to index each element in the list, starting

PYTHON Create a program that reverses the elements in a list. To do this, you will have to index each element in the list, starting from the end, and append it to a new, empty list. Write the program so that it will work with a list of any length.

fruits = ["apple", "banana", "kiwi", "tomato", "apricot"]

reversed_fruits = []

### YOUR CODE HERE ### #

This is the output that you should get:

print(reversed_fruits)

['apricot', 'tomato', 'kiwi', 'banana', 'apple']

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!