diff --git a/src/count_ip_addresses.py b/src/count_ip_addresses.py new file mode 100644 index 0000000..b538448 --- /dev/null +++ b/src/count_ip_addresses.py @@ -0,0 +1,7 @@ +def ips_between(start, end): + start_a = start.split(".") + end_a = end.split(".") + difference = 0 + for index, i in enumerate(start_a): + difference += (int(end_a[index]) - int(i)) * 256 ** (3 - index) + return difference