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))