Python numeric string

Python uses numbers _

Python string

\ n newline
\ n line continuation

r original
If we use the "raw" string, \ n will not be converted to wrap, the end of the row backslash, and line breaks in the source code, will be included as data in the string

The string can be connected string operator + or operator repeated with *:

Strings may be indexed: zero default first index, the second index can be a default string of slitting
Python strings can not be changed. Assignment to a position index results in an error:

The method of using a combination of content to create a new string is simple and efficient:

A negative index out of range will be cut off the excess part, but do not try to use a single element index (presumptuous Qiesuo lead) in:

Guess you like

Origin www.cnblogs.com/fanx-1995/p/11388776.html