Python - 057 : Check the format of a password in python

Опубликовано: 13 Март 2026
на канале: The Digital Folks
217
7

Check the validity of a given password .

Let's say you want to follow 4 rules to validate password -
1. Length must be greater than 7
2. It must have at least 1 capital letter
3. It must have at least one digit
4. It must have at least one special symbols

you can use below methods to check that

str.isupper()
str.islower()
str.isdigit()
len(str)