Examveda

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

A. xyyxyyxyxyxxy

B. 12y12y1212x12

C. 12yxyyxyxyxxy

D. xyyxyyxyxyx12

Answer: Option A


This Question Belongs to Python Program >> Strings In Python

Join The Discussion

Related Questions on Strings in Python