slides10-ex3.py
File contents
f = open("ips.txt", "r")
for linha in f:
    valido = True
    lista = linha[:-1].split(".")
    for elem in lista:
        if int(elem) > 255:
            valido = False
            break
    if valido == False:
        print "IP invalido: "+linha[:-1]
    else:
        print "IP valido: "+linha[:-1]
        

 Forgot your password?
           Forgot your password?
         
             
             Click here to get the file
                
                Click here to get the file