删除字符串里的数字和负号

2018-10-11  本文已影响0人  思君颜如玉

s = '12abcd405'
result = ''.join([i for i in s if not i.isdigit() |(i == '-')])

上一篇 下一篇

猜你喜欢

热点阅读