python 不支持字符串+数字
解决方法1:
"the number is: "+str(10)
解决方法,当需要规定数字的进制和格式:
"the number is:%d" % 10
"the number is:%f" % 10
"the number is:%E" % 10
"the number is:%.02f" % 10.22222
#此处如果需要%E则需要借助转义字符记作:%%f
输出:
the number is:10
the number is:10.000000
the number is:1.000000E+01
the number is:10.22