slightly better readability

This commit is contained in:
a 2020-12-02 09:48:56 -06:00
parent 2a6451876e
commit 95a3d5f8ee

View file

@ -8,7 +8,9 @@ def part1(passwords):
[policy, password] = entry.split(': ') [policy, password] = entry.split(': ')
[counts, character] = policy.split(' ') [counts, character] = policy.split(' ')
[minimum, maximum] = counts.split('-') [minimum, maximum] = counts.split('-')
if int(minimum) <= password.count(character) <= int(maximum): minimum = int(minimum)
maximum = int(maximum)
if minimum <= password.count(character) <= maximum:
valid += 1 valid += 1
return valid return valid