Python can detect weak passwords in a controlled, ethical environment.
weak_passwords = ["123456", "password", "admin"]
user_password = input("Enter your password: ")
if user_password in weak_passwords:
print("Weak password detected")
else:
print("Password is strong")
Used for password audits and awareness.
Next Lesson →