小编Raz*_*zor的帖子

检查字符串是否仅包含某些值,而不包含其他值

print("Hello, welcome to password strength. Test how strong your password is todai!")
password = input("Well enter a password why don't you... ")
print("So your password is", password)
print("Well ok, let's see what i can understand from this...")

if len(password) < 6:   
    print("Your password is too short")    
else:    
    print("Your password is of a good length")    

if password == password.upper():    
    print("Your password has too many uppercase letters")
else:    
    print("Your password has 0 or a couple upper case letters, please consider making your …
Run Code Online (Sandbox Code Playgroud)

python

1
推荐指数
1
解决办法
357
查看次数

标签 统计

python ×1