python 修改字符串中的某一位字符

a='123'
b=bytearray(a)
b[0]='2'
a=str(b)

posted @ 2019-07-03 10:49  ahuo  阅读(2123)  评论(0编辑  收藏  举报