Python 标准库笔记:string模块

1. 常用方法 2.字符串常量 3.字符串模板Template 通过string.Template可以为Python定制字符串的替换标准,下面是具体列子: >>>from string import Template >>>s = Template('$who like $what') >>>print s.substitute(who='i', what='python') i like pyt
相关文章
相关标签/搜索