a = 100b= '10%'c=float(b.replace('%',''))/100 #需要进行下简单的格式转换print a*c
a=100b='10.1%'print a*float(b[:-1])/100