Input and output
Print () Adds a string to the parentheses to output the specified text to the screen.
>>>print ('helloWorld')
Hello World
print()A function can also accept multiple strings, separated by a comma "," and can be connected to a string of outputs:
>>>print ('I am','a','very very very ','beaytiful girl')
I am a very very very beautiful girl
print()Each string will be printed in turn, and a comma "," will output a space, so the output string is spelled like this.
Print () can also output integers, integer run results:
>>>print (+ >>>print) $
What's the input?
>>>name=input () Aimee>>>name ' Aimee '
Input () Enter the value of the variable, assign Aimee to name, enter name to view the assigned value
>>>Print (name) Aimee
Input () can also include a hint that prompts the user to enter a variable value
Name = input ('Please enter your name:') print ('hello' ) , name)
Results after running the hello.py file
Python Learning Three