Password Strength Validator
Write a function that validates a password requires at least 8 characters, one uppercase letter, one digit, and one special character (!@#$%^&*), using regex.
Approach: run four independent checks — a plain length check, plus three separate regex searches — and require all four to pass.
Input: One line: a password.
Output: One line: True or False.
Python@123
True
- 1 <= length <= 100
Hint 1
re.search(r"[A-Z]", password) finds an uppercase letter anywhere in the string.
Hint 2
A character class like [!@#$%^&*] matches any ONE of the listed special characters.
Hint 3
The password is only strong if ALL FOUR checks are True at once — combine them with and.
Four independent checks cover each requirement: len(password) >= 8 for length, and three re.search() calls for an uppercase letter ([A-Z]), a digit (\d), and a special character ([!@#$%^&*]). bool(...) turns each search result (a Match object or None) into True/False, and the password only counts as strong when all four are True.