import re re.findall(r’\bm[a-z]*’, ‘its not mango, its mongo man’1)
(A) [‘mango’,’mongo’,’man’]
(B) [‘its’, ‘mango’, ‘mongo’]
(C) [‘its’,’not’,’mango’,’mongo’,’man’]
(D) [‘man’,’mongo’,’mango’]
Answer: (A)
Explanation: ‘\b’ matches the empty string, but only at the beginning or end of a word. m[a-z]* matches every word starting with ‘m’ in the sentence.
Quiz of this Question
Please comment below if you find anything wrong in the above post