8 lines
223 B
Python
8 lines
223 B
Python
def validar_ip(ip : str) -> bool:
|
|
octetos = ip.split(".")
|
|
if len(octeto) != 4:
|
|
return False
|
|
for octeto in octeto:
|
|
if int(octeto < 0 or int(octeto) > 255):
|
|
return False
|
|
return True |