Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python check if ip is valid

def check_address(ip_address):
    if ip_address.count('.') != 3 or not all(ip_byte.isdigit() and int(ip_byte) < 255 for ip_byte in ip_address.split('.')):
        return False
    return True
 
PREVIOUS NEXT
Tagged: #python #check #ip #valid
ADD COMMENT
Topic
Name
4+3 =