This is part of a function used to check that a password is 9 characters long, alphanumeric, and contains at least 1 number. Ideally I should be able to use the first if statement but strangely, it doesn't run. I can't figure out why test1.isalpha runs as 'True' in the if statement but prints as 'False'.
test1 = 'abcd12345'
if len(test1) == 9 and test1.isalnum and not(test1.isalpha)
print('This should work.')
if len(test1) == 9 and test1.isalnum:
if (test1.isalpha):
print('test1 is', test1.isalpha())
>>>('test1 is', False)