Write a function `reverse` which reverses a list (or in clojure's case, any list-like data structure)

(the dedicated builtin(s) functionalities are deactivated)

Difficulty: introductory

Starter code:

def reverse(lst):
	

Solutions:
from collections import deque

def reverse(lst):
    q = deque()
    for x in lst:
        q.appendleft(x)
    return list(q)

def reverse(lst):
    out = list()
    for i in range(len(lst)-1,-1,-1):
        out.append(lst[i])
    return out


def reverse(lst):
    empty_list = list()            # use this!
    result = list()
    while lst:
        result.append(lst.pop())
    return result


def reverse(lst):
    empty_list = list()
    for i in range(len(lst)):
        empty_list.append(lst.pop())
    return empty_list

def reverse(lst):
    out = list()
    while lst:
        out.append(lst.pop(-1))
    return out


from collections import deque

def reverse(lst):
    cheat = deque(lst)
    cheat.reverse()
    return list(cheat)

def reverse(lst):
    out = list()
    for x in lst:
        out.insert(0, x)
    return out

def reverse(lst):
    result = list()
    for item in lst:
        result.insert(0, item)
    return result


def reverse(lst):
    temp = lst.copy()
    lst.clear()
    for i in range(len(temp)-1, -1, -1):
        lst.append(temp[i])
    return lst

def reverse(lst):
    empty_list = list()    
    for i in lst:
        empty_list = [i] + empty_list
    return empty_list