questions about wrapping lines
First, ask a question, as follows.
The Python program code is as follows:
The output from the previous line of code is as follows:
I ' m Bob. What ' s your name?
The output above does not wrap. To wrap the line before what, the effect is:
I ' m Bob.
What ' s your name?
What to do.
Hit the carriage return before what, OK. No, the effect of this carriage return is the statement wrapping, not the output line wrapping. solutions with line breaks
The solution to the above problem is to insert a line break before what. The wording is:
Print ("I ' m bob.\nwhat ' s your name?")
Tabs
Tabs also belong to the case where the "writing is a combination of two characters, but the meaning is only one character". It is written as "T", a combination of backslashes and T-letters, and T takes the meaning of a table. It means a character, called a tab. Its role is to align the columns of tabular data. Run the following code and you should understand what a tab character is.
#制表符的写法是 \ t, the action is to align the columns of the table.
Print ("School number \ t name \ t language \ t math \ t English")
Print ("2017001\t Cao \t99\t\t88\t\t0")
Print ("2017002\t Zhou Yu \t92\t\t45\t\t93")
Print ("2017008\t huanggai \t77\t\t82\t\t100")