Skip to main content
1 of 5
Dead Possum
  • 3.5k
  • 14
  • 25

Python 2 - 78 bytes

This short, until rules with exit1 are clarified. Now exits with error if nothing is found

Try it online

def F(a,s): while len(a): y=a.pop() for x in a: if x+y==s:r=x,y print r 
Dead Possum
  • 3.5k
  • 14
  • 25