結果 : how to implement two pointers in python