Print ('thequick brown fox'jumpsover'thelazy dog 'Thequick brown fox jumps over the The lazy dog
print()
Each string will be printed sequentially, and a comma "," will output a space, so the output string is spelled like this:
Name = input (")print('Hello,', name)
Sequence one runs, will first print out please enter your name:
, so that the user can follow the prompts, enter the name, the resulting hello, xxx
output:
Finally, it is important to note that the Python program is case-sensitive, and if the case is written incorrectly, the program will give an error.
If there is a lot of line wrapping inside the string, it is not good to read in a single line, and in \n
order to simplify, Python allows ‘‘‘...‘‘‘
the format to represent multiple lines of content
Print ("'line1 ... line2 ... line3") Line1line2line3
Null value
A null value is a special value in Python, None
denoted by. None
cannot be understood as 0
, because 0
it is meaningful, and None
is a special null value.
# -*-coding:utf-8-*-
' Hi,%s, you have $%d. ' % ('Michael', 1000000)
If you're not sure what to use,
%s
Always works, it converts any data type to a string:
Python Learning notes (i)