How can I calculate the subnetmask in Python if I have the first and the last ip adresses in a range?
I want the netmask as e.g. 255.255.255.0.
Thanks 😉
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Say that we have…
Then you can have the representation doing a few XORs. Eg.
So: