結果 : how to repeat certain lines of code in python