python program to learn words