def parse_network_vlan_ranges(network_vlan_ranges_cfg_entries):
 networks = {}
 for entry in network_vlan_ranges_cfg_entries:
  (network, vlan_range) = parse_network_vlan_range(entry)
  if vlan_range:
   networks.setdefault(network, []).append(vlan_range)
  else:
   networks.setdefault(network, [])
 return networks

def parse_network_vlan_ranges ( network_vlan_ranges_cfg_entries ) : networks = { } for entry in network_vlan_ranges_cfg_entries : ( network , vlan_range ) = parse_network_vlan_range ( entry ) if vlan_range : networks . setdefault ( network , [ ] ) . append ( vlan_range ) else : networks . setdefault ( network , [ ] ) return networks
interpret a list of strings as network[:vlan_begin:vlan_end] entries .