Question: 1.Consider the following Python statement: matches = re.search(r'[a-z]oo[a-z]*', The food is good) The variable matches is: a list a match object a tuple a string

1.Consider the following Python statement: matches = re.search(r'[a-z]oo[a-z]*', "The food is good") The variable "matches" is: a list a match object a tuple a string

2. What is the output of the following segment of code?

s = "We are humans"

m = re.match(r'(.*) (.*?) (.*)', s)

print (m.group(2))

'are'

'we'

'humans'

'we are humans'

3. In the functions re.search.start(group) and re.search.end(group), if the argument group is not specified, it defaults to ______________

A.

Zero

B.

None

C.

One

D.

Error

4.

Choose the option wherein the two choices do not refer to the same option

A.

re.I

re.IGNORECASE

B.

re.M

re.MULTILINE

C.

re.X

re.VERBOSE

D.

re.L

re.LOWERCASE

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!