Exercises for python pattern