input: Write a function to divide a given list into N equal parts.
  assert divide_list([1, 2, 3, 4, 5, 6], 3) == [[1, 2, 3], [4, 5, 6]]
  assert divide_list([1, 2, 3, 4, 5, 6, 7, 8, 9], 3) == [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
  assert divide_list([1, 2, 3, 4, 5], 2) == [[1, 2], [3, 4], [5]]
  assert divide_list([1, 2, 3, 4, 5, 6], 4) == [[1, 2, 3, 4], [5, 6]]
output: def divide_list(lst, n):
      k, m = divmod(len(lst), n)
      return [lst[i*k + min(i, m):(i+1)*k + min(i+1, m)] for i in range(n)]