2016-05-24 42 views

回答

2

使用raw_input

table = raw_input("table: ") 

輸入([提示])

Equivalent to eval(raw_input(prompt)) 

This function does not catch user errors. If the input is not syntactically valid, a SyntaxError will be raised. Other exceptions may be raised if there is an error during evaluation. 

If the readline module was loaded, then input() will use it to provide elaborate line editing and history features. 

Consider using the raw_input() function for general input from users. 
相關問題