Python3.x:百分比数转小数
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))