Here:
def isacceptablepassword(a: str) -> bool:
a = a.replace(' ', '')
return a.isalnum() and len(a) >= 6 and not a.isdigit() and not a.isalpha()
Your result:False
Right result:True
Fail:isacceptablepassword("muchlonger5")
PyCharm:
a = 'much longer5' # Also works with 'muchlonger5'
def isacceptablepassword(a):
a = a.replace(' ', '')
return a.isalnum() and len(a) >= 6 and not a.isdigit() and not a.isalpha()
print(isacceptablepassword(a)) # prints True
Created at: 2020/10/18 09:22; Updated at: 2020/10/18 19:29
The question is resolved.