add python solution for q016