

InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
51. |
The character Dot (that is, ‘.’) in the default mode, matches any character other than _____________(a) caret(b) ampersand(c) percentage symbol(d) newlineThe question was asked at a job interview.Enquiry is from Regular Expressions topic in portion Regular Expressions and Files of Python |
Answer» The correct choice is (d) newline |
|
52. |
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 |
|
53. |
What does the function re.match 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 have been asked this question in class test.The origin of the question is Regular Expressions in division Regular Expressions and Files of Python |
Answer» The correct option is (a) MATCHES a pattern at the start of the string |
|
54. |
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) |
|
55. |
Which module in Python supports regular expressions?(a) re(b) regex(c) pyregex(d) none of the mentionedI got this question during an interview for a job.The above asked question is from Regular Expressions in section Regular Expressions and Files of Python |
Answer» Correct CHOICE is (a) re |
|