MCPcopy Create free account
hub / github.com/AxlLind/AdventOfCode / part2

Function part2

2018/src/02.py:11–16  ·  view source on GitHub ↗
(ids: list[str])

Source from the content-addressed store, hash-verified

9 return c[2]*c[3]
10
11def part2(ids: list[str]) -> str:
12 for a,b in combinations(ids,r=2):
13 ans = [c1 for c1,c2 in zip(a,b) if c1 == c2]
14 if len(ans)+1 == len(a):
15 return ''.join(ans)
16 assert False
17
18@aoc.main('02')
19def main(indata: str) -> tuple[int,str]:

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected