You are viewing a single comment's thread. Return to all comments →
result = [] for index,i in enumerate(arr): try: pos = arr.index(m-i, index+1, len(arr)) result=[index+1,pos+1] return result except ValueError: pass
Seems like cookies are disabled on this browser, please enable them to open this website
Ice Cream Parlor
You are viewing a single comment's thread. Return to all comments →
result = [] for index,i in enumerate(arr): try: pos = arr.index(m-i, index+1, len(arr)) result=[index+1,pos+1] return result except ValueError: pass