|
|
|
|
|
by frenchyatwork
2213 days ago
|
|
I'm sure there are cases where multiple lines would be nice, but I don't think this is one. This seems easier to read to me: lambda i: -i * i if i < 0 else i * i
Also, the functional way of doing multiple lines in a lot of situations would typically be to compose smaller lambdas. |
|