QQ.1. Differentiate between List and Tuple in Python. Compare them based on mutability, memory usage, performance, and applications with examples.
- Lists are mutable, allowing modification, addition, or removal of elements after creation.
- Tuples are immutable; their elements cannot be changed once the tuple is created.
- Tuples generally use less memory and offer slightly better performance than lists.
- Lists are defined using `[]` (square brackets), while tuples use `()` (parentheses).
Answer: Python provides Lists and Tuples as fundamental ordered sequence data types, crucial for data analysis as covered in your BEY-015 course. While both store collections of items, their core distinction lies in mutability, which significantly impacts their memory usage, performance, and application scenarios. **Mutability** is the most significant difference. A **List** is a mutable data structure, meaning its elements can be modified, added, or removed after the list has been created. This dynami...