import re
def password():
password1 = input()
valid = re.match("[a-zA-Z]{8}", password1)
if valid:
print("Correct password")
else:
print("Not quite right")
password()
password()
I Believe the problem to be on line 5, however I am not as experienced in this field of python