Help vanity plates
I still have a lot to learn but so far I have not been able to solve this problem. If someone can help me a little to solve this problem, I would be very grateful to continue advancing in this course.
def is_valid(s):
if not s[:2].isalpha():
return False
if not s[2:].isalnum():
return False
if len(s) < 2 or len(s) > 6:
return False
if s[2] == '0':
return False
return True
:) plates.py exists
:) input of CS50 yields output of Valid
:) input of ECTO88 yields output of Valid
:) input of NRVOUS yields output of Valid
:) input of CS05 yields output of Invalid
:) input of 50 yields output of Invalid
:( input of CS50P2 yields output of Invalid
expected "Invalid", not "Valid\n"
:) input of PI3.14 yields output of Invalid
:) input of H yields output of Invalid
:) input of OUTATIME yields output of Invalid