Vidyalelo
Python · Q26

Regular Expressions in Python

Programming · Python · question 26

Q26

What will be the output of the following Python code? re.subn('A', 'X', 'AAAAAA', count=4)

A.
'XXXXAA, 4'
B.
('AAAAAA', 4)
C.
('XXXXAA', 4)
Answer
D.
'AAAAAA, 4'

Answer: Option C

Solution

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