func_code: def swap(a, i, j):
      tmp = a[i]
      a[i] = a[j]
      a[j] = tmp
  
  
  def reverse(a):
      i = 0
      while i < len(a) - 1:
          j = i + 1
          p = 0
          while p < len(a[i:]):
              swap(a, i, j)
              p += 1
          i += 1
      return a