CBSE Class 12 Computer Science
Question 3 of 105
Python Revision Tour II — Question 3
Back to all questions(a)
Both Assertion and Reason are true and Reason is the correct explanation of Assertion.
Explanation
In Python, strings are immutable, meaning once they are created, their contents cannot be changed. Whenever we modify a string, python creates a new string object to hold the modified contents, leaving the original string unchanged. On the other hand, lists in python are mutable, meaning we can modify their contents after they have been created. When we modify a list, python does not create a new list object. Instead, it modifies the existing list object in place.