I’m trying to prepare for a future in computer science, so I started with ECMAScript and I am now trying to learn more about Python. Coming from ECMAScript, seeing multiple assignments such as a, b, c = 1, 2, 3 leaves me bewildered for a moment, until I realize that there are multiple assignments going on. To make things a bit clearer, I’d really like to do (a, b, c) = (1, 2, 3) but I am not sure if this will be a measurable performance hit. From what I understand, tuples are essentially how multiple assignments work regardless, but there are a great many oddities in the world, so I try not to assume anything.
Thanks in advance
It should not have any effect on performance. The parenthesis do not make it a tuple, the comma’s do. So (1,2,3) is exactly the same as 1,2,3