Your question is Two Sum Index Lookup. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Given an integer array nums and an integer target, return the indices of the two distinct elements whose values add up to target. Return the indices as a list of two integers in any order. You may assume exactly one valid answer exists.
def two_sum(nums, target):