Simple IPv4 calculator built in python