def reversel(l,a=0,b=None):
  """ Reverse a list in place from index a up to b, which default to the start and the end. """
  if b is None: 
    b = len(l)
  assert a <= b <= len(l)

  num_swaps = (b-a)//2
  for i in range(num_swaps):
    j = b-i-1
    l[a+i],l[j] = l[j],l[a+i]
  return l