We all love short and fast. But this is definitely an interesting approach. I'd love to see similar approaches to problems if you guys can point out to some.
>>> some_boolean = False
>>> ["Thing 1", "Thing 2"][some_boolean]
"Thing 1" "Thing 1" if some_boolean else "Thing 2"
is also almost twice as fast(775 vs 1340 ns, on my machine).In particular, if you want the side effects of both operations. Trying to write multiple things while checking if any of them failed, for instance.