Returns the shortest possible secret passcode of unknown length for successful login attempts given by `input_file` text file. >>> solution("keylog_test.txt") 6312980
(input_file: str = "keylog.txt")
| 54 | |
| 55 | |
| 56 | def solution(input_file: str = "keylog.txt") -> int: |
| 57 | """ |
| 58 | Returns the shortest possible secret passcode of unknown length |
| 59 | for successful login attempts given by `input_file` text file. |
| 60 | |
| 61 | >>> solution("keylog_test.txt") |
| 62 | 6312980 |
| 63 | """ |
| 64 | logins = Path(__file__).parent.joinpath(input_file).read_text().splitlines() |
| 65 | |
| 66 | return find_secret_passcode(logins) |
| 67 | |
| 68 | |
| 69 | if __name__ == "__main__": |
no test coverage detected