What is the output of the following code:
import re
result = re.sub(r's', '-', 'This is a test.')
print(result)
result = re.sub(r's', '-', 'This is a test.')
print(result)
A. This-is-a-test.
B. An error will occur
C. This--is--a--test.
D. This- is a test.
Answer: Option A

Join The Discussion