On 13/01/24 11:34 pm, Left Right wrote:
To make this
shorter, Python allows:

for <statement> in ... : ...


Um, no, it doesn't. An assignment target is not, on its own, a
statement.

It's hard to make sense of what you're saying. You seem to be
surprised by the fact that Python doesn't require variables to
be declared separately from their use. But this is a very common
feature of dynamic languages generally. As language oddities go,
it hardly rates a mention.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to