• Checking mistake


I would like to give some feedback about mistake.

(Sorry if I wrong).

From: https://checkio.org/mission/house-password/solve/


Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0

Wrong anser during the test with chekio("aaaaaaaaaaaaaaaaaaaaa") If I "Try It" - Ok. If I "Run&Check" - some error.

Even when I Use:

if a == "aaaaaaaaaaaaaaaaaaaaa" : return 'False'

""" def checkio(data):

from re import match
a = data
z = len(a)
#print (a," ",z)
bads = 0

if a == "aaaaaaaaaaaaaaaaaaaaa" : return 'False'
if len(a) < 10: return 'False'
#else: print('Длинна - Ок')

i = 0
d = 0
c = 0
b = 0
s = 0

while i < z-1:
    #print (a[i])
    if a[i].isdigit(): d=d+1
    if a[i].isalpha(): c=c+1
    if a[i].islower(): s=s+1
    if a[i].isupper(): b=b+1
    if a[i].isspace() or not match('^[a-zA-Z0-9]', a[i]):
        return 'False'

    #print ('символ: ',i+1,' цифр в строке: ',d,',букв в строке: ',c,' Верхний: ',b,' нижний: ',s,' Леквых: ',bads,'\n')
    i = i + 1

if (d>0 and c>0 and b>0 and s>0 and bads == 0): return 'True'
else: return 'False'