Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
好的,所以基本上我想用所有相同的值同时定义 4 个单独的变量。
有没有可能按照这个思路做点什么?
a, b, c, d = 4
其中所有四个变量分别等于 4?
使用此语法:
a = b = c = d = 4
演示:
>>> a = b = c = d = 4 >>> a 4 >>> b 4 >>> c 4 >>> d 4