假设我想除以2,加1,再乘以5。
之类的x /= 2 += 1 *= 5
显然行不通。
我尝试了不同的组合使用括号和海象操作符,但不能产生产生的东西工作,更少的东西好读
这不是你可以链接的东西。完全可读的
并没有错x /= 2
x += 1
x *= 5
或
x = (x/2 + 1) * 5
为什么要加等号??应该这样做:
x = 100
print((x/2 +1) * 5)