結果 : traverse string using while loop in python