lst = [1, 2, 3, 4, 5]

for i in range(len(lst) // 2):
    result = len(lst) - i - 1

    temp = lst[i]
    lst[i] = lst[result]
    lst[result] = temp

print(lst)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: