Home > Article > Backend Development > Detailed introduction to Python's built-in input function
English documentation:
input
([prompt])
If the prompt argument is present, it is written to standard output without a trailing newline. The function then reads a line from input, converts it to a string (stripping a trailing newline), and returns that. When EOF is read, EOFError
is raised
Instructions:
1. If the promat parameter is provided, the parameter value is first output to the standard output, and No line breaks. FunctionReads the value entered by the user and converts it into a string.
>>> s = input('please input your name:') please input your name:Ain >>> s 'Ain'
The above is the detailed content of Detailed introduction to Python's built-in input function. For more information, please follow other related articles on the PHP Chinese website!