Write a Python script/program that reads an arbitrary file and build a concordance of the words in the file. The concordance should contain the line number on which the word first occurs as well as the number of times the word occurs in the file. The program needs to print out the concordance in alphabetical order. For example:
a 2 3
book 1 2
spam 1 7
the 2 4