A python program for learning words