1.

What does the function re.search do?(a) matches a pattern at the start of the string(b) matches a pattern at any position in the string(c) such a function does not exist(d) none of the mentionedI had been asked this question in class test.The above asked question is from Regular Expressions in division Regular Expressions and Files of Python

Answer»

Correct choice is (B) MATCHES a PATTERN at any position in the string

For explanation: It will LOOK for the pattern at any position in the string.



Discussion

No Comment Found

Related InterviewSolutions