MCQ Single Best Answer Not Set

QWhat will be the output after the following statements?
import re
x = re.compile(r'^Py')
y = x.search('Python_3')
print(y.group())

ID: #4088 Python RegEx Module MCQ 185 views
Question Info
#4088Q ID
Not SetDifficulty
Python RegEx Module MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A ['Py']
  • B Py
  • C ['P', 'y']
  • D ['P', 'y', '3']
Correct Answer: Option B

Explanation

Py

Share This Question

Challenge a friend or share with your study group.