Python Question: Using recursion to complete the output
Let a = ['a', 'b', 'c', 'd', 'e']
# The first two lines of the function are as follows:
def reverse_list(my_list):
print(len(my_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 its original order
--------------
The output shown is:
5
4
3
2
1
['e', 'd', 'c', 'b', 'a']