Vidyalelo
Python · Q29

Regular Expressions in Python

Programming · Python · question 29

Q29

What will be the output of the following Python code? re.split(r' +', 'Chrome is better than explorer', maxspilt=3)

A.
['Chrome', 'is', 'better', 'than', 'explorer']
B.
['Chrome', 'is', 'better', 'than explorer']
Answer
C.
('Chrome', 'is', 'better', 'than explorer')
D.
'Chrome is better' 'than explorer'

Answer: Option B

Solution

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