This commit is contained in:
Deni 2020-12-02 13:48:20 +01:00
parent f4c3aeabee
commit bee9432ebe
1 changed files with 1 additions and 7 deletions

View File

@ -11,7 +11,6 @@ filename = "input.txt"
with open(filename) as f:
content = f.readlines()
#content = [x.strip() for x in content]
validPasswords = 0
@ -25,12 +24,7 @@ for i in content:
password = line[2]
count = 0
for c in password:
if c == character:
count = count + 1
if (count >= xMin) and (count <= xMax):
if ( xMin <= password.count(character) <= xMax ):
validPasswords = validPasswords + 1
print (validPasswords)