Testing some tidbits

from blog Ned Batchelder's blog, | ↗ original
↗ original
I posted a Python tidbit about checking if a string consists entirely of zeros and ones:I got a bunch of replies suggesting other ways. I wanted to post those, but I also wanted to check if they were right. A classic testing structure would have required putting them all in functions, etc, which I didn’t want to bother with.So I cobbled together...