l = [ [True] * 3 ] * 2
l[0][0] = False
print l
>>>>[
[False,True,True],
[False,True,True],
[False,True,True]
]
应该:
[True for I in range(5)]这种格式?
l = [ [True] * 3 ] * 2
l[0][0] = False
print l
>>>>[
[False,True,True],
[False,True,True],
[False,True,True]
]
应该:
[True for I in range(5)]这种格式?