1.

Which of the following creates a pattern object?(a) re.create(str)(b) re.regex(str)(c) re.compile(str)(d) re.assemble(str)The question was posed to me in homework.My doubt stems from Regular Expressions in chapter Regular Expressions and Files of Python

Answer»

Right answer is (C) re.compile(STR)

To EXPLAIN: It converts a given STRING into a pattern OBJECT.



Discussion

No Comment Found

Related InterviewSolutions