Question: 1. What is the Python module for regular expressions? A. regex B. pyregex C. re D. pyre 2. What is the output of the code

1. What is the Python module for regular expressions? A. regex B. pyregex C. re D. pyre

2.

What is the output of the code shown below?

re.split(r'(a)(t)', 'Maths is a difficult subject')

A.

['M a t h s i s a d i f f i c u l t s u b j e c t']

B.

['Maths is a difficult subject']

C.

['Maths', 'is', 'a', 'difficult', 'subject']

D.

['M', 'a', 't', 'hs is a difficult subject']

3.

Which of the following creates a pattern object?

A.

re.create(str)

B.

re.regex(str)

C.

re.compile(str)

D.

re.assemble(str)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!