码迷,mamicode.com
首页 > 其他好文 > 详细

字体替换 re.sub

时间:2019-05-11 23:21:50      阅读:136      评论:0      收藏:0      [点我收藏+]

标签:大写   技术   span   for   div   col   .com   items   http   

dic={hqo3r: , hq6ic: , hq7yw: , hq1lk: , hqpe1: }

content=‘‘‘
总体hqo3r则,错的注(hq6ic)释不如(hq6ic)没有注释。所以当一段代码(hq1lk)发生变化时,第一件(hq1lk)事就是要(hqpe1)修(hq1lk)改注释!注释必须使用英文,最好是完整的句子,
首字母大写,句后要有结束符,结束符后跟两个空格,开始下一句。如果是短语,可以省略结束符。

‘‘‘
#sub(pattern, repl, string, count=0, flags=0)

for k,v in dic.items():

    content=re.sub(k,v,content) # 需要用变量接收

print(content)

技术图片

 

字体替换 re.sub

标签:大写   技术   span   for   div   col   .com   items   http   

原文地址:https://www.cnblogs.com/knighterrant/p/10850385.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!