diff --git a/int-to-ip4.py b/int-to-ip4.py index dd91b4c..52dbeab 100755 --- a/int-to-ip4.py +++ b/int-to-ip4.py @@ -9,6 +9,6 @@ for e in range(3, -1, -1): multiplier = 256 ** e octet = num // multiplier addr.append(str(octet)) - num -= octet * multiplier + num = num % multiplier print('.'.join(addr))