Extract lines from file, add to new files

Left Right olegsivokon at gmail.com
Sun Jan 14 08:27:15 EST 2024


> What do you mean?
>
> for x in lambda: ...:
>   ...
>
> Perfectly grammatical.

1. You put the lambda definition in the wrong place (it should be in
the left-hand side, or as Python calls it "star_targets", but you put
it into "star_expressions", which would be where the right-hand side
is drawn from).
2. You used what Python calls "lambdadef" in place of what Python
calls "function_def". I.e. lambda definition and function definition
are two different things, at least as far as grammar is considered.

So, you solved a different problem.


More information about the Python-list mailing list