We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba356ca commit 0f3c633Copy full SHA for 0f3c633
maths/is_ip_v4_address_valid.py
@@ -51,25 +51,25 @@ def is_ip_v4_address_valid(ip: str) -> bool:
51
False
52
"""
53
54
- parts = ip.split('.')
+ parts = ip.split(".")
55
56
if len(parts) != 4:
57
return False
58
-
+
59
for part in parts:
60
if not part:
61
62
63
for i in range(len(part)):
64
if not part[i].isdigit():
65
66
67
- if part[0] == '0' and len(part) > 1:
+ if part[0] == "0" and len(part) > 1:
68
69
70
- if not (0 <= int(part) <= 255):
+ if not (0 <= int(part) <= 255):
71
72
73
return True
74
75
0 commit comments