我創建Python的一個程序,讓您創建一個用戶名和密碼,這是我到目前爲止有: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行 if raw_input()=='no': TypeError:'str'對象不可調用。
請幫
是你在Python 2.7或3.x版寫這個? –