What is the output of the following program :
import resentence = 'horses are fast'
regex = re.compile('(?P<animal>w+) (?P<verb>w+) (?P<adjective>w+)')
matched = re.search(regex, sentence)
print(matched.groupdict())
Download the Study24x7 App, so you can connect and collaborate.