aoc 2017 (day 1-6)
This commit is contained in:
14
www/statics/aoc/2017/04_solution-2.py
Normal file
14
www/statics/aoc/2017/04_solution-2.py
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import aoc
|
||||
|
||||
|
||||
rawinput = aoc.read_input(4)
|
||||
|
||||
rcount = 0
|
||||
for line in rawinput.splitlines():
|
||||
words = list(map(lambda x: "".join(sorted(list(x))), line.split(' ')))
|
||||
if len(set(words)) == len(words):
|
||||
rcount += 1
|
||||
print(rcount)
|
||||
|
||||
Reference in New Issue
Block a user