转换字符串

a ='qwerty'
a=a.replace('w','*')replace——实现了w和*的转换 
print(a)
打印出来的是这个'q*erty'

 

posted @ 2021-03-02 19:37  火烧火燎  阅读(37)  评论(0)    收藏  举报