# Function that takes array as parameter and returns a reverse array
# using loop
def reverse_list(arr = []):
for i in arr[::-1]:
print(i)
arr_num = [1, 2, 3, 4, 5]
print(reverse_list(arr_num))
I want my function to take an array as a parameter, but I'm not sure if the structure /code of it is correct.