check password

import re
i = input('Pls input you password')
n = len(i)
num1 = re.compile(r'[0-9]+')
big = re.compile(r'[A-Z]+')
small = re.compile(r'[a-z]+')
if n > 8 :
if num1.search(i):
if big.search(i):
if small.search(i):
print("password is ok")
else:
print("password not have small char")
else:
print("password not have big char")
else:
print("password not have number")
else:
print("password must bigger than 8")
posted @ 2018-01-18 10:03  Shadow_yang  阅读(92)  评论(0编辑  收藏  举报