Belay Technologies needs to identify two values in an integer sequence whose combined value matches a requested target. Given an array nums and an integer target, return the indices of the two distinct elements whose values sum to target.
Use a single element at most once. You may assume every valid input contains exactly one solution. Return the indices in ascending order of their position in the array.
nums, a list of integers, and target, an integer.[i, j] where i < j and nums[i] + nums[j] == target.two_sum(nums, target).def two_sum(nums, target):