def intersect(valueA, valueB, lowerCase=False):
 retVal = []
 if (valueA and valueB):
  valueA = arrayizeValue(valueA)
  valueB = arrayizeValue(valueB)
  if lowerCase:
   valueA = [(val.lower() if isinstance(val, basestring) else val) for val in valueA]
   valueB = [(val.lower() if isinstance(val, basestring) else val) for val in valueB]
  retVal = [val for val in valueA if (val in valueB)]
 return retVal

def intersect ( valueA , valueB , lowerCase = False ) : retVal = [ ] if ( valueA and valueB ) : valueA = arrayizeValue ( valueA ) valueB = arrayizeValue ( valueB ) if lowerCase : valueA = [ ( val . lower ( ) if isinstance ( val , basestring ) else val ) for val in valueA ] valueB = [ ( val . lower ( ) if isinstance ( val , basestring ) else val ) for val in valueB ] retVal = [ val for val in valueA if ( val in valueB ) ] return retVal
returns intersection of the array-ized values .