Vidyalelo
Python · Q28

MCQs for Python Strings: Exam

Programming · Python · question 28

Q28

What will be the output of the following code:string = "Hello, world!"print(string.replace("o", "i"))

A.
Helli, wirld!
B.
Hell, wirld!
C.
Hii
Answer
D.
Hello, world!

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board