KnowledgeBoat Logo
|

Computer Science

Assertion (A): In Python, the strings are mutable.

Reasoning (R): In strings, the values are enclosed inside double or single quotes.

  1. Both A and R are true and R is the correct explanation of A.
  2. Both A and R are true but R is not the correct explanation of A.
  3. A is true but R is false.
  4. A is false but R is true.

Python String Manipulation

1 Like

Answer

A is false but R is true.

Explanation
In Python, strings are immutable, meaning their content cannot be changed after they are created. Strings in Python are defined by enclosing text within single (' ') or double (" ") quotes.

Answered By

2 Likes


Related Questions