Vidyalelo
Python · Q72

MCQs for Python Strings: Exam

Programming · Python · question 72

Q72

What will be the output of the following Python code snippet? print('xyyxyyxyxyxxy'.replace('xy', '12', 0))

A.
xyyxyyxyxyxxy
Answer
B.
12y12y1212x12
C.
12yxyyxyxyxxy
D.
xyyxyyxyxyx12

Answer: Option A

Solution

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