sea-stream

 

import re  
street = \'21 Ramkrishna Road\'  
print(re.sub(\'Road$\', \'Rd.\', street))

将结尾的Road用Rd.替换

分类:

技术点:

相关文章: