aoc/2018/02/part2.py

21 lines
611 B
Python
Raw Permalink Normal View History

2018-12-02 05:58:35 +00:00
with open('input.txt') as input:
lines = [line.strip('\n') for line in input.readlines()]
for line1 in lines:
for line2 in lines:
i = 0
amt = 0
for i in range(len(line1)):
if line1[i] != line2[i]:
diff = i
amt += 1
if amt > 1:
break
i += 1
if amt == 1:
print(line1 + '\n' + line2)
print('you can figure out where the different char is')
break
if amt == 1:
break