1

Topic: Python - a simple problem on checkio.org

Good afternoon. I solve a problem on password check (> 10 characters, the upper and lower register, digits):

import re
def checkio (data: str)-> bool:
#replace this for solution
assert (9 <len (data) <64) == True, "My0"
assert re.findall ("[a-z] +", data) == True, "My1"
assert re.findall ("[A-Z] +", data) == True, "My2"
assert re.findall ("[0-9] +", data) == True, "My3"
return True or False

We take off for an error on the password though all conditions transit:

Fail: checkio ("ULFFunH8ni") AssertionError: My1, checkio, 8

What I not so do?

2

Re: Python - a simple problem on checkio.org

arriome wrote:

That I not so do?

The list  is not equal True

3

Re: Python - a simple problem on checkio.org

Rewrite so:
assert bool (re.findall ("[a-z] +", data)), "My1"

4

Re: Python - a simple problem on checkio.org

ULFFunH8ni Cannot satisfy with all to three  simultaneously.
I noted a semantic precipice between setting (the password should contain
Both digits and characters and capital.) and implementation. Its (setting) needs to be rethought
Before translating into language . One character of the password should be or
Digit or.... e.t.c.