1.

Which of the following statements regarding the output of the function re.match is incorrect?(a) ‘pq*’ will match ‘pq’(b) ‘pq?’ matches ‘p’(c) ‘p{4}, q’ does not match ‘pppq’(d) ‘pq+’ matches ‘p’

Answer» Right answer is (d) ‘pq+’ matches ‘p’

Explanation: All of the above statements are correct except that ‘pq+’ match ‘p’. ‘pq+’ will match ‘p’ followed by any non-zero number of q’s, but it will not match ‘p’.


Discussion

No Comment Found