Question:

What is the output of the following program :

import re
sentence = 'horses are fast'
regex = re.compile('(?P\w+) (?P\w+) (?P\w+)')
matched = re.search(regex, sentence)
print(matched.groupdict())

 

Answers:


Keywords:

© 2017 QuizBucket.org