python 字符串中特定字符替换

t='2018-08-07'
t1=t.replace('-','')
print(t1)  #输出为20180807

猜你喜欢

转载自blog.csdn.net/weixin_38383877/article/details/82192404