#004 <br/> # use three quotation marks (''' or """) multiple-line string <br/> Print ''' line1 <br/> line2 <br/> line3 ''' <br/> # In addition, you can also use single and double quotation marks in any three quotation marks <br/> Print ''' "what's up? , "He replied. ''' <br/> # Otherwise, you can use escape characters to achieve the same effect. <br/> # It is better to use three quotation marks, otherwise, the visual beauty will be damaged. <br/> Print '/"What/'s up? ,/"He replied. '<br/> # You can use raw (R) (original string) to eliminate the escape Function of escape characters <br/> Print R'/"What/'s up? ,/"He replied. '<br/> # The full equality between single quotes and double quotes seems to mean that python does not have the concept of" char "<br/> # this is exactly the case! <Br/> # "char" is a machine service (the genesis of the computer revolution was in a machine. the genesis of our programming ages thus tends to look like that machine .) <br/> # Python serves programmers.
Output:
1 2 3 4 5 6 |
Line1 Line2 Line3 "What's up? , "He replied. "What's up? , "He replied. /"What/'s up? ,/"He replied. |