0
点赞
收藏
分享

微信扫一扫

'string' has no attribute 'maketrans'

是波波呀 2023-03-16 阅读 96


# 去掉abc
s2 = 'abc12303023xyz'
table = str.maketrans("", "", "abc")
print(s2.translate(table))


举报

相关推荐

0 条评论