Vidyalelo
Python · Q34

MCQs for Python Strings: Exam

Programming · Python · question 34

Q34

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

A.
xyyxyyxyxyxxy
B.
12y12y1212x12
Answer
C.
none of the mentioned
D.
error

Answer: Option B

Solution

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