摘要:
1.python中的赋值,与C语言相比,没有返回值。>>> x = 1 >>> y = (x = x + 1) # assignments not expressions! File "<stdin>", line 1 y = (x = x + 1) ^ SyntaxError: invalid syntax 2.python的“多元”赋值:>>> x,y,z=1,2,3 #或 (x,y,z)=(1,2,3)>>> z3>>> x1“=”两边的值都是元组。 阅读全文