MCQ Practice Single Best Answer Topic: Python RegEx Module MCQ

Q What will be the output after the following statements?
import re
x = re.compile(r'(.*)day')
y = x.findall('Today is a nice day and a Sunday')
print(y)

Question ID
#4091
Subchapter
Python RegEx Module MCQ
Action
Choose one option below

Choose Your Answer

Click an option to check whether your answer is correct.

  • A ['To']
  • B ['Today is a nice day and a Sunday']
  • C ['Today is a nice day and a Sun']
  • D ['Today is a nice day']
Correct Answer: C

Explanation

['Today is a nice day and a Sun']

Share This Question

Share this MCQ with your friends or study group.