7. 字符串服务

The modules described in this chapter provide a wide range of string manipulation operations.

In addition, Python’s built-in string classes support the sequence type methods described in the Sequence Types — str, unicode, list, tuple, bytearray, buffer, xrange section, and also the string-specific methods described in the 字符串方法 section. To output formatted strings use template strings or the % operator described in the 字符串格式化操作 section. Also, see the re module for string functions based on regular expressions.

上一话题

6. 内置异常

下一话题

7.1. string — 常见字符串操作

本页