Skip to content

Instantly share code, notes, and snippets.

@usinglight
Created December 2, 2017 13:36
Show Gist options
  • Save usinglight/fa2f78ecd4ea0da85748387f00f89199 to your computer and use it in GitHub Desktop.
Save usinglight/fa2f78ecd4ea0da85748387f00f89199 to your computer and use it in GitHub Desktop.
aoc2a.py
f=open('data2.txt','r')
rows =[]
fsum=0
for line in f:
row = line.split()
row=[int(i) for i in row]
print(max(row))
print(min(row))
fsum+=(max(row)-min(row))
rows.append(row)
print(fsum)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment