Python 中文数字转阿拉伯数字
摘要:
#只能转数字,传参中包含非数字会错. def t(str): zhong={'零':0,'一':1,'二':2,'三':3,'四':4,'五':5,'六':6,'七':7,'八':8,'九':9}; danwei={'十':10,'百':100,'千':1000,'万':10000}; num=0; if len(str)==0: return 0; if len(str) 阅读全文
posted @ 2019-04-08 22:11 狂自私 阅读(4442) 评论(0) 推荐(0) 编辑