mirror of
https://github.com/thib8956/advent-of-code.git
synced 2025-08-24 08:21:57 +00:00
make 2020 compatible with run.py
This commit is contained in:
@@ -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')
|
||||
|
Reference in New Issue
Block a user