Examveda

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'>

C. No output

D. Error

Answer: Option B


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

Join The Discussion

Related Questions on Regular Expressions in Python