1. Home
  2. Data Science
  3. Python
  4. Which module in Python provides support for regular…

Added 25 Jan 2024

Which module in Python provides support for regular expressions?

  1. re Correct answer
  2. regex
  3. string
  4. pattern

Correct answer

A. re

16 views

MCQSEXAM

Explanation

The re module provides regular expression support in Python. Key functions include re.search(), re.match(), re.findall(), re.sub() and re.compile().

regex is a third-party package rather than part of the standard library, and the string module only holds constants and simple helpers.

Want more practice? Try the full set of Computer Science MCQs on MCQsExam.com.

Doubts & discussion

Not sure why the answer is A? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs