标签:des style blog width get int string 2014 http cti com
Keyboard input
Python provides a build-in function called raw_input (in version 2.x) that gets input from the keyboard. In Python 3.x we use input(). When this function is called, the program stops and waits for the user to type something. When the user presses Return or Enter, the program resumes and input() returns what the user typed as a string.
Before calling input(), it is a good idea to print a prompt telling the user what to input. input() takes a prompt as an argument:
from Thinking in Python
Keyboard input,码迷,mamicode.com
标签:des style blog width get int string 2014 http cti com
原文地址:http://www.cnblogs.com/ryansunyu/p/3702843.html