0
Why design like this?
Most of the time, a comma won't follow the last item in a list. However, it is perfectly valid to place one there, and it is encouraged in some cases.
6 Respostas
+ 4
so when adding item at the end, there will not be error because of missing comma
設計上,這樣可以避免error
0
Sir , How to change
A as [3,2,4] in one line ?
A=[1,2,]
print (type(A))
print (A)
A[???]=(3,4)
print (type(A))
print (A)
0
唔唔明你想達到甚麼
A[???] = (3,4) 這句
是想最後print出甚麼結果?
0
怎麽用一條編碼將
A=[1,2,]改成 A=[3,2,4]
0
A[0] = 3
A.append(4)
0
有辦法用一行解決嗎