結果 : how to do pattern matching in python