Python list and tuple, both of them consists of multiple objects identified its position.

list

L=[1, 2, 3]

tuple

T=(1,2,3)

Difference between them is that tuple is immutable.

That is,

L[0]=100

is OK, but

T[0]=100

is not allowed.

© 2011 Web Oom Suffusion theme by Sayontan Sinha
Switch to our mobile site
Top Footer