Computer Science

Which amongst the following is a mutable data type in Python ?

  1. int
  2. string
  3. tuple
  4. list

Python Data Handling

1 Like

Answer

list

Reason — The mutable data type in Python from the options given is a list. Lists can be modified after creation, allowing elements to be added, removed, or modified within the list. In contrast, integers (int), strings, and tuples are immutable data types in Python, meaning their values cannot be changed once they are created.

Answered By

2 Likes


Related Questions