an exercise of python