add Solution of Problem 20, 21 in Python version