Output of a Decorator Applying Four Regex Substitutions

Company: Accenture

Difficulty: medium

Problem Statement

Question 1

What will be the output of the following code? ```python import re def text_decorator(func): def wrapper(*args): text = func(args[0]) ret_str = re.sub(r'S.+y', 'Monday', text) ret_str = re.sub(r'p[a-z]{2}y', "study", ret_str) ret_str = re.sub(r'B.*l{2}', "Biology", ret_str) ret_str = re.sub(r'S.+g', "Sociology", ret_str) return ret_str return wrapper my_text = """It is Sunday. Ravi went to play Ba