def splitFields(fields, delimiter=','):
 fields = fields.replace(('%s ' % delimiter), delimiter)
 commas = [(-1), len(fields)]
 commas.extend(zeroDepthSearch(fields, ','))
 commas = sorted(commas)
 return [fields[(x + 1):y] for (x, y) in zip(commas, commas[1:])]

def splitFields ( fields , delimiter = ',' ) : fields = fields . replace ( ( '%s ' % delimiter ) , delimiter ) commas = [ ( - 1 ) , len ( fields ) ] commas . extend ( zeroDepthSearch ( fields , ',' ) ) commas = sorted ( commas ) return [ fields [ ( x + 1 ) : y ] for ( x , y ) in zip ( commas , commas [ 1 : ] ) ]
returns list of fields splitted by delimiter .