python next level, lecture 22 solution