I was wondering if there is a pythonic way to write a code equivalent to the one below without defining
doSomething as a separate function.
if test: for i in s: doSomething() else: doSomething()
In particular, I am thinking of the use case where
test checks if