Possible duplicate:
Tilde operator in Python
What does the squiggle operator do, i.e. ~in python?
(This is probably Python 101 for most, but I met ~in the code and had no idea what it was, and it took me a lot of research to figure it out, so I hope this Q&A can help someone along the way.)
source
share