81. What will be the output of the following Python code?
re.sub('Y', 'X', 'AAAAAA', count=2)
re.sub('Y', 'X', 'AAAAAA', count=2)re.sub('Y', 'X', 'AAAAAA', count=2)sentence = 'horses are fast'
regex = re.compile('(?P<animal>\w+) (?P<verb>\w+) (?P<adjective>\w+)')
matched = re.search(regex, sentence)
print(matched.group(2))sentence = 'we are humans'
matched = re.match(r'(.*) (.*?) (.*)', sentence)
print(matched.group(2))CODE 1
>>> re.split(r'(a)(t)', 'The night sky')
CODE 2
>>> re.split(r'\s+', 'The night sky')re.sub('morning', 'evening', 'good morning')sentence = 'horses are fast'
regex = re.compile('(?P<animal>\w+) (?P<verb>\w+) (?P<adjective>\w+)')
matched = re.search(regex, sentence)
print(matched.groups())w = re.compile('[A-Za-z]+')
w.findall('It will rain today')