更新时间:2022-12-19 21:18:16
这是因为您两次运行该函数,一次在if语句中,一次在打印中.将其存储在这样的变量中:
This is because you are running the function twice, once in the if statement, and once in the print. Store it in a variable like so:
# ...
for i in range(0, 5):
# ...
# ...
bibeon = input("Enter password: ")
chkResult = passwordChk(bibeon)
if chkResult == 'Valid Password':
print(chkResult)
break
else:
print(chkResult)