Python Tuples, Lists & Strings Comparison
Comparison summary for Python tuples, lists and strings are tabulated below:
Tuples | Lists | Strings |
---|---|---|
Container | Container | Container |
Order Matters | Order Matters | Order Matters |
Heterogeneous / Homogeneous | Heterogeneous / Homogeneous | Homogeneous |
Indexable | Indexable | Indexable |
Iterable | Iterable | Iterable |
Immutable (Fixed length, Fixed order, No in-place reversal and No in-place sort) | Mutable (Length can change, Order can change, In-place sort and reversal are possible) | Immutable (Fixed length, Fixed order, No in-place reversal and No in-place sort) |