#!/usr/bin/python # # python script tel.py # gevonden door Jan Mooij 24 september 2000 # from sys import * from string import * # Create an empty dictionary. count = {} for line in open(argv[1], 'r').readlines(): for word in split(line): if count.has_key(word): count[word] = count[word] + 1 else: count[word] = 1 words = count.keys() words.sort() for word in words: print "%15s\t%10d" % (word, count[word])