What Will Be The Output Of The Following Python Codep Pre #985
What will be the output of the following Python code?</p> <pre><code class="language-python">import re s = "A new day" m = re.match(r'(.*)(.*?)', s) print(m.group(2)) print(m.group(0))</code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs109 Python. It can also be found in gs gs109 Regular Expressions - Python Regular Expressions - Quiz No.4.
What will be the output of the following Python code?
import re s = "A new day" m = re.match(r'(.*)(.*?)', s) print(m.group(2)) print(m.group(0))
No output A new day
No output No output
[‘A’, ‘new’, ‘day’] (‘A’, ‘new’, ‘day’)
Error [‘A’, ‘new’, ‘day’]