Python3.x:百分比数转小数
def change_percent(num): zfflag = "" if "+" in num: num = num.replace("", "") if "-" in num: zfflag = "-" num = num.replace("-", "") if "%" in num: num = num.replace("%", "") return zfflag+str(float(num) / float(100))
原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/16763.html