【发布时间】:2016-11-13 05:48:46
【问题描述】:
我正在 python 上创建一个程序,允许您创建用户名和密码,这是我目前所拥有的:
#Code
username = str(input("Please enter a username:"))
print("Your username is",username,",proceed?")
raw_input = input()
if raw_input() == 'no':
re_u = input("Please re-enter username")
else:
import getpass
mypass = getpass.getpass("Please enter your password:")
我遇到的麻烦是: 回溯(最近一次通话最后): 第 6 行,在 如果 raw_input() == '否': TypeError: 'str' 对象不可调用。
请帮忙
【问题讨论】:
-
你是用 python 2.7 还是 3.x 写的?
标签: python