CBSE Class 12 Computer Science
Question 2 of 44
Solved 2025 Sample Question Paper CBSE Class 12 Computer Science (083) — Question 2
Back to all questions#THONPROGRAM
Reason — The replace() method in Python searches for a specified substring and replaces it with another. In the given code, the substring 'PY' in the string "PYTHONPROGRAM" is replaced with the character '#'. As a result, the string "PYTHONPROGRAM" becomes "#THONPROGRAM", and that's the output displayed.