You're making a shallow copy of ans, means the elements inside the list in ans are not copied, they remain the same. Use copy.deepcopy() .
確定! 回上一頁