uebung1 #1
7
src/count_ip_addresses.py
Normal file
7
src/count_ip_addresses.py
Normal file
@ -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
|
||||
Loading…
x
Reference in New Issue
Block a user