5. verifies if the input password by the user has met the strong password requirement

PHOTO EMBED

Fri Aug 19 2022 14:31:18 GMT+0000 (Coordinated Universal Time)

Saved by @mwebrania #python

import re
p = input('Input your password: ')
x = True
while x:
    if(len(p)<6 or len(p)>12):
        break
    elif not re.search('[a - z]', p):
        break
    elif not re.search('[0 - 9]', p):
        break
    elif not re.search('[A - Z]', p):
        break
    elif not re.search('[$#@]', p):
        break
    elif not re.search('\s', p):
        break
    else:
        print('Valid Password')
        x = False
        break
if x:
    print('Not a Valid Password')
content_copyCOPY