python - 语法错误 : "unexpected character after line continuation character in python" math

标签 python math syntax continuation

我在创建这个 Python 程序时遇到了问题,我正在创建这个程序来做数学、计算等解决方案,但我得到了语法错误:“python 中行连续字符后的意外字符”

这是我的代码

print("Length between sides: "+str((length*length)*2.6)+" \ 1.5 = "+str(((length*length)*2.6)\1.5)+" Units")

我的问题是 \1.5 我试过 \1.5 但它不起作用

使用 python 2.7.2

最佳答案

除法运算符是/,不是\

关于python - 语法错误 : "unexpected character after line continuation character in python" math,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7791913/

相关文章:

python - 如何在每个列表元素的末尾添加后缀?

用于恢复购买的 Javascript 算法

math - 简化表达

c++ - 纯碱基变化

c++ - 创建一个结构数组的数组?

python Pandas : replace a str value of column in another str column with a special character

Python:身份验证凭据异常: "Request had invalid authentication credentials. Expected OAuth 2 access token"

C 函数语法,在参数列表之后声明的参数类型

gcc - yacc 中的 %left 和 %right

python - 过滤 pandas 时间序列的最快方法是什么?