li = [] while True: user = input("请输入用户名") if user.upper() == 'Q': break pwd = input("请输入密码") li.append([user, pwd]) print(li)