On 14/01/24 16:48, Chris Angelico wrote:
On Sun, 14 Jan 2024 at 14:43, dn via Python-list <python-list@python.org> wrote:
Similarly, whilst we could write:
a, b, c = 1, 2, 3
I would only do this when it aligns particularly well with the
algorithm being implemented. For example, you could start a Fibonacci
evaluator with "a, b = 0, 1". Otherwise, there's not all that much
reason to unpack three constants in this way.
(Though I am much more likely to use multiple initialization to set a
bunch of things to the SAME value, lilke "a = b = c = 0".)
Neatly stated!
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list