While validating item combinations in the Walmart de México y Centroamérica shopping experience, find two distinct item prices whose values add up to a requested total.
Given an integer array nums and an integer target, return the indices of the two elements whose sum equals target. Return the indices in ascending order. You may not use the same element twice, and each valid input contains exactly one solution.
nums, an array of integers, and target, an integer.[i, j], where i < j and nums[i] + nums[j] == target.def two_sum(nums, target):