问题:
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