Question: Python Question: Using recursion, to complete the output looks like. Let a = ['a', 'b', 'c', 'd', 'e'] #fist two line function is that def

Python Question: Using recursion, to complete the output looks like.

Let a = ['a', 'b', 'c', 'd', 'e']

#fist two line function is that

def reverse_list(list): print(len(list))

The function must call itself with a smaller list until the length of my_list is 1

The function should return a new list in reverse order, leaving the original list in it's original order

--------------

The output shown is:

5 4 3 2 1

['e', 'd', 'c', 'b', 'a']

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!