New submission from Anudeep Balla :
https://docs.python.org/3.8/library/ipaddress.html
import ipaddress
ADDRESSES = [
'172.16.254.00'
]
for ip in ADDRESSES:
addr = ipaddress.ip_address(ip)
if addr.version==4:
{
print("true"
Anudeep Balla added the comment:
That was the whole point I was trying to make that there were no references
that state .00 is equivalent to .0 and if you would try any IP validator
or would check by any means you would find that the IP address is invalid.
I truly understand the point that
Anudeep Balla added the comment:
Greetings,
Any Ip address containing 2 zeros or more are considered to be an invalid
IP address.
'172.16.254.00' *is not* equivalent to '172.16.254.0'
I guess this small logic is causing the error
I hope it makes it clear from the be