summaryrefslogtreecommitdiff
path: root/progs/a221.py
diff options
context:
space:
mode:
Diffstat (limited to 'progs/a221.py')
-rw-r--r--progs/a221.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/progs/a221.py b/progs/a221.py
new file mode 100644
index 0000000..db89f03
--- /dev/null
+++ b/progs/a221.py
@@ -0,0 +1,23 @@
+import re
+def pass_validity(p):
+ 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 re.search("\s",p):
+ break
+ else:
+ return True
+ x=False
+ break
+
+ if x:
+ return False \ No newline at end of file