def genDelimiter(fileName):
 if fileName.endswith(('.csv', '.CSV')):
  delim = ','
 else:
  delim = ' DCTB '
 return delim

def genDelimiter ( fileName ) : if fileName . endswith ( ( '.csv' , '.CSV' ) ) : delim = ',' else : delim = ' DCTB ' return delim
return a delimiter based on a filename .