blob: 1cf69248c90b77711a9d9c94cffa996fa5e9f9a6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/usr/bin/env python3
def main() -> None:
with open("input", "r", encoding="utf-8") as f:
print(
sum(
map(
lambda p: len(p) == len(set(p)),
# START PART 1
map (
lambda l: l.split(), f.readlines()
),
# END PART 1 START PART 2
map(
lambda l: list(map(lambda w: "".join(sorted(w)), l.split())), f.readlines()
),
# END PART 2
)
)
)
if __name__ == "__main__":
main()
|