所以我有一个叫做单元格的类:
class cell:
possibles = [ "1", "2", "3", "4", "5", "6", "7", "8", "9" ]
value = None;
def __init__(self, value):
if value == "":
self.value = "0"
else:
self.value = value
if __name__=="__main__":
mlist = [cell("2"), cell("6"), cell("8")]
mlist[2].possibles.remove("3")
print mlist[0].possibles
输出是:
['1', '2', '4', '5', '6', '7', '8', '9']
当我从第三项中显式删除它时,为什么它会从数组第一项中的可能值中删除它?