LTIMindtree Interview Question

What is the difference between list and tuple?

Interview Answers

Anonymous

Nov 12, 2024

- **List**: A mutable, ordered collection of elements in Python, defined with square brackets `[]`. - **Tuple**: An immutable, ordered collection of elements in Python, defined with parentheses `()`.

Anonymous

Oct 8, 2024

List is mutable and tuplw is immutable where list is used for entering name in a column and tuple is used to have id for each person which is didtinct for everyone.

1