Extract lines from file, add to new files

dn PythonList at DancesWithMice.info
Sun Jan 14 17:30:03 EST 2024


On 14/01/24 16:48, Chris Angelico wrote:
> On Sun, 14 Jan 2024 at 14:43, dn via Python-list <python-list at 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



More information about the Python-list mailing list