Question: can use while and for loops. PYTHON Define a function reverseList that has one parameter of type list. The list can be empty or contain
can use while and for loops. PYTHON
Define a function reverseList that has one parameter of type list. The list can be empty or contain values that are either float, int, or string. The function should return the list in the reversed order. You must use a for or a while loop. You cannot use slicing or any built-in function or method that reverses the contents of the list. You are writing your own version of reverse function.
Example: if the parameter list contains [a, 5, 2, hey], the function should return [hey, 2, 5, a].
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
