lst = [0,1,2,3,4] lst[0], lst[4] = lst[4], lst[0] print(lst) #[4, 1, 2, 3, 0]
But, when you assign them to a variable you get a different solutio