markov implementation

markov.py from kernigan and pike’s perl