Computer Science · Python String Immutability
Assertion (A): The statement my_string[0] = 'H' will raise a TypeError in Python. Reason (R): Strings in Python are immutable sequences, meaning their individual elements cannot be assigned new values in place. Choose the correct option:
- 1A is false but R is true.
- 2A is true but R is false.
- 3Both A and R are true but R is NOT the correct explanation of A.
- 4Both A and R are true and R is the correct explanation of A.✓
Correct answer
Both A and R are true and R is the correct explanation of A.
Download Single Question PDF
Save this question and verified answer as a clean study sheet with live clickable link.
Share with Friends & Study Groups
Challenge your peer aspirants on WhatsApp or Telegram to solve this question!
Preparing for Computer Science?
Practice full-length mock tests with real exam timers, instant score analysis, and all-India ranking.
Want more practice questions on Python String Immutability?
Solve complete topic-wise tests with detailed solutions on GkGet.
Related Practice Questions
Recommended practice questions in Computer Science · Python String Immutability