问题 I know there are some similar questions up here, but they mostly either want to find the range itself (which uses some libraries, like the example that stackoverflow says is a dupe of my question) and is in another language. I have a way to convert the subnet into the beginning and the end of the range of ip's in a subnet (okay, bad wording, it's simply like 1.1.1.1/16 -> (1.1.0.0 , 1.1.255.255) ) I now want to check if 1.1.2.2 is within this subnet. Can I simply do a > and < to compare? ip