0 votes
184 views
in Computer Science by (8.5k points)
Identify the output of the following code snippet:

text = "PYTHONPROGRAM"

text=text.replace('PY','#')

print(text)

(A) #THONPROGRAM

(B) ##THON#ROGRAM

(C) #THON#ROGRAM

(D) #YTHON#ROGRAM

1 Answer

0 votes
by (56.5k points)
 
Best answer

Correct option is (A) #THONPROGRAM

text = "PYTHONPROGRAM"

text=text.replace('PY','#THONPROGRAM')

print(text)

...