Vidyalelo
Python · Q43

Regular Expressions in Python

Programming · Python · question 43

Q43

What will be the output of the following Python code? re.split(r'(a)(t)', 'Maths is a difficult subject')

A.
['M a t h s i s a d i f f i c u l t s u b j e c t']
B.
['Maths', 'is', 'a', 'difficult', 'subject']
C.
Maths is a difficult subject'
D.
['M', 'a', 't', 'hs is a difficult subject']
Answer

Answer: Option D

Solution

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