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:
@@ -15,14 +15,10 @@ def test_password(line):
|
||||
return count in repeat_range
|
||||
|
||||
|
||||
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