code: def getWordList(ipFile, delim):
      
      indexedWords = {}
      totWords = 0
      totLines = 0
      with codecs.open(ipFile, "r",encoding='utf-8', errors='replace') as f:
          for line in f:
              totLines = totLines + 1
              words = multi_split(line, delim)
              totWords = totWords + len(words)
              for word in words:
                  cleanedWord = word.lower().strip()
                  if cleanedWord not in indexedWords:
                      indexedWords[cleanedWord] =  str(totLines)
                  else:
                      indexedWords[cleanedWord] = indexedWords[cleanedWord] + ' ' + str(totLines)
      return totWords, totLines, indexedWords
docs: extract a unique list of words and have line numbers that word appears