def obtain_vendor_model(show_ver):
 match = re.search('Cisco (.+?) .+bytes of memory', show_ver)
 if match:
  return ('Cisco', match.group(1))
 else:
  return (None, None)

def obtain_vendor_model ( show_ver ) : match = re . search ( 'Cisco (.+?) .+bytes of memory' , show_ver ) if match : return ( 'Cisco' , match . group ( 1 ) ) else : return ( None , None )
obtain vendor and model from show version data .