1

I'm looking for a way to create a list of IP addresses with arbitrary start and end address in python ipaddress module.

example: ip_range = somefunc("192.168.1.1,192.168.1.10")

from the documentation it appears that the module have a standard way of creating either single IPv4Address or CIDR IPv4Network, but not arbitrary list.

Vano
  • 1,416
  • 1
  • 13
  • 26
  • Possible duplicate of [How can I generate all possible IPs from a list of ip ranges in Python?](https://stackoverflow.com/questions/17641492/how-can-i-generate-all-possible-ips-from-a-list-of-ip-ranges-in-python) – Peter Jul 14 '19 at 13:45
  • Thanks @Peter.. hope there's nicer way than mentioned there. So far https://netaddr.readthedocs.io/en/latest/tutorial_03.html#convert-an-ip-set-to-an-ip-range has native way of doing that. But it's outside of standard lib... – Vano Jul 14 '19 at 14:42

0 Answers0