Ñò YTZLc@sadZddklZddklZhZd„Zd„ZedjoeedƒndS( s¤ Print the numbers of the lines containing each word in a named text file. Usage: python concordance.py filename Author: Rodney Topor Last updated: 5 August 2009 iÿÿÿÿ(targv(tsplitc Cs¸tiƒy;d}x.t|dƒD]}|d}t||ƒq#WWntj od|GHdSXtiƒ}|iƒx6|D].\}}d|Gx|D]}d|GqWHq‚WdS(s’ Print the numbers of the lines containing each word in filename. Print the words (with their line lists) in alphabetical order. itrisIO Error in %sNs%s: s%d (tlinestcleartopentprocesstIOErrortitemstsort(tfilenametnumbertlinetpairstwordtnumbers((sconcordance.pytcounts&       cCs”|iƒ}td|ƒ}xr|D]j}|djoW|iƒ}ti|ƒo*|t|jot|i|ƒqˆqŒ|gt|s