Which of the following will result in an error?

Phương Quyên

New member
Which of the following will result in an error?
A.
>>> p = re.compile("d")
>>> p.search("door")
B. >>> p = re.escape(‘hello’)
C. >>> p = re.subn()
D. >>> p = re.purge()
 
Answer: c
Explanation: The function re.subn() will result in an error. This is because subn() requires 3 positional arguments while we have entered none.
 

Tìm kiếm

Back
Top