How can you replace a matched pattern with a new string using regular expressions in Python?
A. By using the sub() function from the re module
B. By using the replace() function
C. By using the new() function
D. By using the replace keyword
Answer: Option A

Join The Discussion