【发布时间】:2013-09-10 17:16:11
【问题描述】:
这个列表看起来像这样
words = ['how', 'much', 'is</b>', 'the', 'fish</b>', 'no', 'really']
我想在每个以</b> 结尾的字符串的开头添加<b>,而不会丢失单词序列。
words = ['how', 'much', '<b>is</b>', 'the', '<b>fish</b>', 'no', 'really']
到目前为止,我已经详细说明了很多,因此不胜感激!
谢谢!
【问题讨论】:
标签: python string list replace find