字符替换

a = "123*"

hm = a.replace('*', r"X")

print(hm)

"""
运行结果:
123X
"""


posted @ 2018-10-16 13:14  疯狂的骆驼  阅读(94)  评论(0编辑  收藏  举报