200k views
5 votes
code the function, reversetop, which is passed a list and returns a reversed list of the high-level entries. do not use the built-in reverse function

1 Answer

0 votes

Let's reverse the list without using reverse function.


\tt def reversetop():


\qquad\tt global\:L


\qquad\tt L2=L[::-1]


\qquad\tt return\:L2


\tt L=eval(input(


\tt print(

User Rajesh Wadhwa
by
8.1k points