Skip to content

Instantly share code, notes, and snippets.

import re
def auth (password):
error = 0
if len(password)<6 :
error = -1
if len(password)>12:
error = -7
elif not re.search("[a-z]", password):
error = -2
elif not re.search("[A-Z]", password):