查漏补缺(三)——使用字符串
摘要:模板字符串:string模块提供另一种格式化值的方法:模板字符串。它的工作方式类似于很多UNIXShell里的变量替换。如下所示,substitute这个模块方法会用传递进来的关键字参数foo替换字符串中的$foo :>>>from string import Template>>>s=Templ...
阅读全文
posted @ 2015-11-20 13:20
posted @ 2015-11-20 13:20
posted @ 2015-11-19 21:35
posted @ 2015-11-16 23:56