我想要的是这个:
>>> x = 2 >>> y = x+10 >>> print(y) 12 >>> x = 30 >>> print(y) #Whatever x is, y is that number x, plus 10. 40
如何在 Python 版本 x 中声明这种“因变量”?
python python-3.x
python ×1
python-3.x ×1