Python case-sensitive question

Asked 2 years ago, Updated 2 years ago, 13 views

def passwordStrength(password):
    point = 0

    for i in range(len(password)):
        if password[i].islower:
            point = point + 5

if __name__ == '__main__':
    print(passwordStrength('f^BAcG'))

The .isupper() function returns True for all incoming strings, whether uppercase or lowercase. Does anyone know why?

python

2022-09-20 17:24

1 Answers

I didn't write parentheses in isupper.


2022-09-20 17:24

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.