adding new python code: word rotation - checks if one word is a rotation of another