diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 90defdd..126c4e5 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,7 +4,7 @@ + + + + - + \ No newline at end of file diff --git a/main.py b/main.py index d9f7e95..97544fe 100644 --- a/main.py +++ b/main.py @@ -13,10 +13,11 @@ def main(ip): print('HostMin:', net[1]) print('HostMax:', net[-2]) print('Hosts:', len(list(net.hosts()))) # Выводит кол-во хостовых ip + count = 0 for n_ip in net.hosts(): + count += 1 if str(n_ip) == list_ip[0]: - list_n_ip = str(n_ip).split('.') - print('№ в сети:', list_n_ip[3]) + print('№ в сети:', count) # Выводит какой ip по счёту в сети break