Question
PYTHON Write a function called reverse_list 1. Takes a list with 5 elements as an input 2. Create a new empty list 3. Fill the
PYTHON Write a function called reverse_list 1. Takes a list with 5 elements as an input 2. Create a new empty list 3. Fill the new empty list with the input list values in reverse order 4. Return the new list ii. Define a list called numbers with 5 numbers [1, 2, 3, 4, 5] iii. Print the numbers list iv. Call the reverse_list function passing in the numbers list v. Print the output of the reverse_list function vi. Print the numbers list again c. BUILT-IN FUNCTION i. Using a built-in list function, reverse values in the numbers list ii. Print the numbers list again d. Write comments in the file to answer the following questions i. What does your function do? ii. What does the built-in function do? iii. Does your function behave differently than the built-in function? If yes, how?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started