this function is supposed to return the list in reverse but instead, it is only returning the last element of the list. I would like to know what is the issue.
def reverse_list(lt):
for f in lt[::-1]:
return f
lt = [1,2,3,4]
print(reverse_list(lt))