I am not in familiar with ip addresses or networking stuff but I am not sure that it would be good idea to create sequence with 79228162514264337593543950336 elements (you need one to determine len).
Skimming documentation I found iterators:
hosts() (Returns an iterator over the usable hosts in the network.)
ipaddress.summarize_address_range(first, last) (Return an iterator of the summarized network range given the first and last IP addresses.)
One can always do simple math:
Skimming documentation I found iterators:
hosts() (Returns an iterator over the usable hosts in the network.)
ipaddress.summarize_address_range(first, last) (Return an iterator of the summarized network range given the first and last IP addresses.)
One can always do simple math:
>>> int(ipaddress.IPv4Address('127.0.0.5')) - int(ipaddress.IPv4Address('127.0.0.1')) 4 >>> int(ipaddress.IPv6Address('1::')) 5192296858534827628530496329220096
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.