Examveda

What will be the output of the following Python code?
re.sub('Y', 'X', 'AAAAAA', count=2)

A. 'YXAAAA'

B. ('YXAAAA')

C. ('AAAAAA')

D. 'AAAAAA'

Answer: Option D


This Question Belongs to Python Program >> Regular Expressions In Python

Join The Discussion

Related Questions on Regular Expressions in Python