1.

The function of re.search is __________(a) Matches a pattern at the start of the string(b) Matches a pattern at the end of the string(c) Matches a pattern from any part of a string(d) Such a function does not existThe question was asked during a job interview.Query is from Regular Expressions topic in chapter Regular Expressions and Files of Python

Answer»

The correct OPTION is (C) Matches a pattern from any part of a string

The BEST I can EXPLAIN: The re module of PYTHON consists of a function re.search. It’s function is to match a pattern from anywhere in a string.



Discussion

No Comment Found

Related InterviewSolutions