input: 
  def divide_in_two_parts_with_min_diff(lst):
      """
      Divide a given list of numbers into two equal parts such that the difference between the sum of the two parts is minimum.
      >>> divide_in_two_parts_with_min_diff([2, 3, 4, 5, 6, 7])
      ([2, 4, 5], [3, 6, 7])
      >>> divide_in_two_parts_with_min_diff([10, 20, 30, 40])
      ([10, 40], [20, 30])
      """
      n = len(lst)
      total_sum = sum(lst)
      target = total_sum // 2
      dp = [[False for _ in range(target + 1)] for _ in range(n + 1)]
      dp[0][0] = True
      
      for i in range(1, n + 1):
          for j in range(target + 1):
              dp[i][j] = dp[i - 1][j]
              if j >= lst[i - 1]:
                  dp[i][j] = dp[i][j] or dp[i - 1][j - lst[i - 1]]
      
      sum1 = 0
      for j in range(target, -1, -1):
          if dp[n][j]:
              sum1 = j
              break
      
      sum2 = total_sum - sum1
      part1 = []
      part2 = []
      j = sum1
      
      for i in range(n, 0, -1):
          if j >= lst[i - 1] and dp[i - 1][j - lst[i - 1]]:
              part1.append(lst[i - 1])
              j -= lst[i - 1]
          else:
              part2.append(lst[i - 1])
      
      part1.reverse()
      part2.reverse()
      return part1, part2
  
output:     part1.reverse()
      part2.reverse()
      return part1, part2