I'm trying to code a password strength checker, and I want to deduct points if the entered password is a common keyboard combination such as "qwerty" or "asdfg". I have a list that goes ['q', 'w', 'e', ... 'b', 'n', 'm']. If any part of the input has consecutive elements from the list, I want to deduct points. Say the password is "djoDFGibTY" (Caps just to highlight, all lower case), I want my code to catch the "DFG" and "TY" and deduct points twice, with more points deducted in the first case for a triple violation and lesser in the second case for a double violation. Thank You.
keyboard_pattern = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'z', 'x', 'c', 'v', 'b', 'n', 'm']
if password in keyboard_pattern:
score -= 15
    
with more points deducted in the first case for a triple violation and lesser in the second case for a double violation, how many points for the first case and how many for the second case