結果 : how to write a nested loop in python