Skip to content

Instantly share code, notes, and snippets.

Created Dec 1, 2020
What would you like to do?
def dictFind():
seen = dict()
with open(file, 'r') as infile:
for line in infile:
num = int(line)
complement = 2020-num
if complement in seen:
success(num, complement)
seen[num] = True
print ("Finished loop, no pairs found that sum to 2020")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment