Sure, I see that. My intent in commenting was merely to point out to others that are learning the craft/language that lambdas generally shouldn't be assigned to names.
EDIT: Poking around the site, I see that there are a lot of code golf type answers around. I guess it's probably not worth being so pedantic around here.
No blame! Just wanted to mention it to people new to the language.
Important note: it is a best practice to not recycle or shadow internal names like 'str'.
aw man, I assumed numpy wouldn't be available.
I agree. It's hard to fix bugs for test cases you can't read.
Sure, I see that. My intent in commenting was merely to point out to others that are learning the craft/language that lambdas generally shouldn't be assigned to names.
EDIT: Poking around the site, I see that there are a lot of code golf type answers around. I guess it's probably not worth being so pedantic around here.
Assigning a lambda expression to a name is a PEP8 violation, though:
https://www.python.org/dev/peps/pep-0008/#programming-recommendations