Vidyalelo
Python · Q38

Regular Expressions in Python

Programming · Python · question 38

Q38

What will be the output of the following Python code? re.match('sp(.*)am', 'spam')

A.
<_sre.SRE_Match object; span=(1, 4), match='spam'>
B.
<_sre.SRE_Match object; span=(0, 4), match='spam'>
Answer
C.
No output
D.
Error

Answer: Option B

Solution

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