password_check1="Anil@123"
password_check2=[]
#i=password_check1.capitalize()
if len(password_check1)>=8:
if password_check1[0].isupper()==True:
if password_check1.isspace()==False:
lookingfor = "@"
for c in range(0, len(password_check1)):
if password_check1[c] == lookingfor:
pass
#print("given characteris there in",password_check1)
for word in password_check1.split():
if word.isdigit():
password_check2.append(int(word))
print(password_check2)
else:
print("no digits")
else:
print("dnot give spaces")
else :
print("first letter should be capital")
else :
print("password should be min 8 letter")
No comments:
Post a Comment