Python Programming Language Quiz 1 Python Programming Language Quiz 1 Can you perform mathematical operation on String?YesNoWhat is the output of the following? sentence = 'lions are fast' regex = re.compile('(?P<animal>\w+) (?P<verb>\w+) (?P<adjective>\w+)') matched = re.search(regex, sentence) print(matched.groupdict()){‘animal’: ‘lions’, ‘verb’: ‘are’, ‘adjective’: ‘fast’}‘horses are fast’(‘horses’, ‘are’, ‘fast’)‘are’Xrange returnsthe listxrange objectbothnone of theseWhich command is used to retrieve the character at third index from the string s=”Hello”?s[3] s.__getitem__(3)both a and bnone of the aboveHow will you reverse a list?list.reverse()random()isdigit()join(seq)What is the output of the following? numbers = {} numbers[(1,2,4)] = 8 numbers[(4,2,1)] = 10 numbers[(1,2)] = 12 sum = 0 for k in numbers: sum += numbers[k] print len(numbers) + sum30243312What is picklinga module which accepts any Python objectto retrieve its original objects from the stored string representation bothnone of theseCan multiple exceptions be handled in one block of except statements ?noyes, like except [TypeError, SyntaxError] yes, like except TypeError, SyntaxError [,…]none of the mentionedWhat is the output of the following? def foo(j, y=[]): y.append(y.append(j)) return y for j in range(3): x = foo(j) print(x)[[[0]], [[[0]], [1]], [[[0]], [[[0]], [1]], [2]]] [[0], None, [1], None, [2], None][[0], [[0], 1], [[0], [[0], 1], 2]][[[0]], [[[0]], [1]], [[[0]], [[[0]], [1]], [2]]]Let A and B be objects of class Foo. Which functions are called when print(A + B) is executed?__sum__(), __str__()__str__(), __sum__()__add__(), __str__()__str__(), __add__()