filePath = "input.txt"wordList = []wordCount = 0#Read lines into a listfile = open(filePath, 'rU')for line in file: for word in line.split(): wordList.append(word) wordCount += 1print wordListprint "Total words = %d" % wordCount
Name (required)
email (will not be published) (required)
Website