Python处理字符串中的数字

1、

from string import digits
aa = '1043数学'
res = aa..translate(str.maketrans('','',digits))
print(res)

 2、slice()

原文地址:https://www.cnblogs.com/cola-1998/p/13433069.html