renamed 2 digit file names

This commit is contained in:
Tristan 2018-12-10 23:56:11 +00:00
parent 018011dd27
commit b4d985a55a
44 changed files with 0 additions and 0 deletions

14
2018/02/part1.py Normal file
View file

@ -0,0 +1,14 @@
with open('input.txt') as input:
lines = [line.strip('\n') for line in input.readlines()]
two = 0
three = 0
for line in lines:
for char in 'qwertyuiopasdfghjklzxcvbnm':
if line.count(char) == 2:
two += 1
break
for char in 'qwertyuiopasdfghjklzxcvbnm':
if line.count(char) == 3:
three += 1
break
print(two, three, two * three)