Python

版权声明:本文为博主原创文章,未经博主同意不得转载。 https://blog.csdn.net/u012515223/article/details/27050431

文本处理模块


本文地址: http://blog.csdn.net/caroline_wendy/article/details/27050431


Python文本处理模块, 使用四种内置库.

string.Template, 即string模板, 用户能够改动的模板, 在静态文本中插入动态值.

textwrap模块, 对从段落抽取的文本进行格式化输出.

re模块, 提供了完整的正則表達式库.

difflib模块, 依据加入删除改动的部分, 推断不同文本序列之间的详细区别.




【推广】 免费学中医,健康全家人
原文地址:https://www.cnblogs.com/ldxsuanfa/p/10675797.html