QuestionQ277

VerifiedFunctions and Exceptions

What output is expected from the following code?

Question Image

Explanation

Python strings are immutable, so an indexed character cannot be deleted with del. The statement del text[2] raises a TypeError, preventing print from producing a returned string.

Community Discussion

No comments yet. Be the first to start the discussion!