7. String Services - Python 2.7.18 documentation 编辑
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 String Methods section. To output formatted strings use template strings or the %
operator described in the String Formatting Operations section. Also, see the re
module for string functions based on regular expressions.
- 7.1.
string
— Common string operations - 7.2.
re
— Regular expression operations - 7.3.
struct
— Interpret strings as packed binary data - 7.4.
difflib
— Helpers for computing deltas - 7.5.
StringIO
— Read and write strings as files - 7.6.
cStringIO
— Faster version ofStringIO
- 7.7.
textwrap
— Text wrapping and filling - 7.8.
codecs
— Codec registry and base classes - 7.9.
unicodedata
— Unicode Database - 7.10.
stringprep
— Internet String Preparation - 7.11.
fpformat
— Floating point conversions
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论