結果 : how to write patterns in python