1: Double quote escape
<span style= "FONT-SIZE:18PX;" ><strong>print "he\" Llo "</strong></span>
you only need to precede the double quotation mark with a backslash.
Output result: he "Llo
2: Concatenation of strings
(1) You can use the + number
<span style= "FONT-SIZE:18PX;" ><strong>print "Hello" + "" + "wolrd" </strong></span>
(2) You can use commas
<span style= "FONT-SIZE:18PX;" ><strong>print "Hello", "World" </strong></span>
(3) can use * number
<span style= "FONT-SIZE:18PX;" ><strong>print "Hello" *3</strong></span>
Output Result:
Hello wolrd
Hello World
Hellohellohello
3: String length
<span style= "FONT-SIZE:18PX;" ><strong>print len ("Hello") </strong></span>
Use the Len () function. Output Results 5
4: Type conversion: string to int
<span style= "FONT-SIZE:18PX;" ><strong>print Int ("111") + 1</strong></span>
Output Results
5: Type conversion: int to string
<span style= "FONT-SIZE:18PX;" ><strong>print "AAA" + str (1) </strong></span>
Using the function str
Output Result: AAA1
Python Learning: string manipulation