Can you please check if my solution is correct and thus more succinct?
def max_min(lst):
i = 0
ptr = 0
n = len(lst)
big_swap = True
b = n - 1
s = n
i = 0
if n == 0:
return lst
while s > i:
if big_swap:
lst[i],lst[b] = lst[b],lst[i]
b -= 1
else:
if s == n:
lst[i],lst[s-1] = lst[s-1],lst[i]
else:
lst[i],lst[s] = lst[s],lst[i]
s -= 1
big_swap = not big_swap
i += 1
return lst