albertbrandl.bsky.social
@albertbrandl.bsky.social
True if ((ss:=sorted(s)) and ss[0] in "01" and ss[-1] in "01") else False

Not particularly efficient, since the characters have to be sorted first, but I always wanted to use the walrus operator like this...
December 2, 2024 at 2:29 PM