問題:
Now I know that it is not safe to modify the list during an iterative looping.現在我知道在迭代循環期間修改列表是不安全的。 However, suppose I have a list of strings, and I want to strip the strings themselves.但是,假設我有一個字符串列表,並且我想剝離這些字符串本身。 Does replacement of mutable values count as modification?替換可變值算作修改嗎?
解決方案:
參考一: https://en.stackoom.com/question/H7i5參考二: https://stackoom.com/question/H7i5