1. 程式人生 > >python賦值

python賦值

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)]這種格式?