我必须从数组中删除所有特定值(如果有的话),所以我写道:
while value_to_remove in my_array: my_array.remove(value_to_remove)
通过一个命令,还有更多的pythonic方法吗?
python
python ×1