() vs []

Mick Krippendorf mad.mick at gmx.de
Wed Oct 14 19:21:54 CEST 2009


mattia schrieb:
> Any particular difference in using for a simple collection of element () 
> over [] or vice-versa?

Just try this and you'll see:

tup = (1,2,3)
tup.append(4)

or:

tup = (1,2,3)
tup[0] = 4

HTH,
Mick.



More information about the Python-list mailing list