180908 input

input

while

if

# -*- coding:utf-8 -*-
flag = 0
while flag == 0 :
    username = input('请输入用户名:
')
    password = input('请输入密码
')
    if username == 'ps' and password =='ps':
        print('成功!')
        flag = 1
    else:
        print('输入不正确,请重新输入!')

  

原文地址:https://www.cnblogs.com/pscc/p/9610418.html