Câu lạc bộ trực tuyến - Tải go88 hit Club

Strings

Besides numbers, Python can also manipulate strings, which can be expressed in several ways. They can be enclosed in single quotes ('...') or double quotes ("...") with the same result.

In the interactive interpreter, the output string is enclosed in quotes and special characters are escaped with backslashes. While this might sometimes look different from the input (the enclosing quotes could change), the two strings are equivalent. The string is enclosed in double quotes if the string contains a single quote and no double quotes, otherwise it is enclosed in single quotes.

See also

Strings, and the Unicode strings described in the next section, are examples of sequence types, and support the common operations supported by such types.
Both strings and Unicode strings support a large number of methods for basic transformations and searching.
Information about string formatting with is described here.
The old formatting operations invoked when strings and Unicode strings are the left operand of the % operator are described in more detail here.

 

This entry was posted in Uncategorized. Bookmark the permalink.