AttributeError: 'int' object has no attribute 'islower' | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

AttributeError: 'int' object has no attribute 'islower'

Hi, I'm trying to test(lower, upper, alphanumeric, numeric) the output from each iteration in " for loop", however i get the error "AttributeError: 'int' object has no attribute 'islower'" """ lista = [] password = 'Test}123' pass_len = int(len(password)) for n in range(pass_len): if n.islower()==True: if 'lower' in lista: pass lista.append['lower'] if n.isupper()==True: if 'upper' in lista: pass lista.append['upper'] if n.isapha()==True: if 'alpha' in lista: pass lista.append['alpha'] if n.numeric()==True: pass lista.append['numeric'] if len(lista)<4: print ('Yor password isnt strong enough') else: pass """

30th Mar 2020, 7:42 AM
Lamennais
1 Answer
+ 5
Okay n cant be lower you might mean password[n]
30th Mar 2020, 7:45 AM
Oma Falk
Oma Falk - avatar