You can just use x[-1] to do the exact same thing. ~0 = -1 though, hence the reason x[~0] has kind of a nice feel to it.
your humor detection may be broken.
I don't get it, either. I mean, I realize that the OP's method would be obscure to someone who's never seen it, but at least on some level, it's more intuitive. Your example is simply obfuscated code for no other reason (other than humor, apparently, which like I said, I missed).