用户的输入如何满足选择的要求? [关闭]

问题描述 投票:0回答:0

所以,我想让代码看到用户的输入,满足我选择的要求。假设我想让用户输入一个密码,但它必须是 8 个字母或更多,并且有一个字母是大写字母。

password = input("What is your password?: ")
if password == #what function is used here

我想知道代码使用什么函数。我希望你能帮忙。谢谢!

string user-input
© www.soinside.com 2019 - 2024. All rights reserved.