結果 : how to write nested loop in python