title: Compare if subnet is in IP range, in Python?
body: <p>I have a set of subnets with labeled descriptions in a csv file. I need to assign these descriptions to the Data Probe ranges that these subnets belong to in another csv file. </p>
  
  <p>Given a subnet with an ipaddress <code>34.0.0.0</code> and netmask <code>255.255.0.0</code>,<br>
  I want to check if the subnet is in the range <code>34.163.83.230-34.163.83.230</code></p>
  
  <p>I have considered creating a range  from the subnet's ip and net mask and comparing it to the Data Probe ranges. I haven't been able to find out if this would yield the correct answer.</p>
  
  <p>I cannot use the latest version of Python (this has to work with an application running python 2.7), so the <code>ipaddress</code> module is not an option for me. </p>