make 2020 compatible with run.py

This commit is contained in:
2025-07-30 01:00:27 +02:00
parent f9abb90915
commit 9c76828788
14 changed files with 119 additions and 81 deletions

View File

@@ -19,14 +19,10 @@ def test_password(line):
pwd[second_pos - 1] == letter)
def main(inp):
with open(inp) as passwds:
valid_counter = 0
for l in passwds:
if test_password(l):
valid_counter += 1
print(f"Number of valid password in input : {valid_counter}")
def main(passwds):
valid_counter = 0
for l in passwds:
if test_password(l):
valid_counter += 1
print(f"Number of valid password in input : {valid_counter}")
if __name__ == "__main__":
main('./input.txt')