結果 : how to write pattern program in python