Python Operators
thetaranights.com
thetaranights.com
>> a = [1, 2, 3]
>> b = a
>> a += [4]
>> a
[1, 2, 3, 4]
>> b
[1, 2, 3, 4]
By comparison, >> a = [1, 2, 3]
>> b = a
>> a = a + [4]
>> a
[1, 2, 3, 4]
>> b
[1, 2, 3]The ability to override operators is one of the things I miss most from Python when I'm forced to write javascript.
@ For matrix multiplication, equivalent to __matmul__
@= <<= >>= ^= |= Assignment operators
https://www.thetaranights.com/python-assignment-expression-p...