Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I\'m not sure what the answer is for this one, if someone could answer and expla

ID: 3585554 • Letter: I

Question

I'm not sure what the answer is for this one, if someone could answer and explain, please?

QUESTION 4 Consider the following Python function call using the findall function from the re module finda 11 ( ' ', html code) - Which of the following best describes the p urpose of this function call? It finds all strings contained in html_code that match the following criteria: . * o * * must begin with must be followed by one or more lower-case alphabetic characters, a space, and then one or more lower-case alphabetic characters must be followed by an equals sign must be followed by a pair of double quotation marks containing one or more lower-case alphabetic letters must end with'>' and returns a list of all matching HTML tags It finds all strings contained in html_code that match the following criteria: . * o * must begin with must be followed by one or more lower-case alphabetic characters, a space, and then one or more lower-case alphabetic characters must be followed by an equals sign must be followed by a pair of double quotation marks, optionally containing lower-case alphabetic letters must end with '>, and returns just the first sequence of alphabetic characters (i.e. those matched by the expression inside the parentheses) It finds all strings contained in html_code that match the following criteria: . * o * * must begin with must be followed by zero or more lower-case alphabetic characters, a space, and then zero or more lower-case alphabetic characters must be followed by an equals sign must be followed by a pair of double quotation marks, optionally containing lower-case alphabetic letters must end with'>' and returns just the first sequence of alphabetic characters (i.e. those matched by the expression inside the parentheses) It finds all strings contained in html_code that match the following criteria: . must begin with * must be followed by one or more lower-case or upper-case alphabetic characters, a space, and then one or more lower-case or upper-case alphabetic characters o must be followed by an equals sign * must be followed by a pair of double quotation marks, optionally containing lower-case alphabetic letters must end with '>, and returns just the first sequence of alphabetic characters (i.e. those matched by the expression inside the parentheses) It finds all strings contained in html_code that match the following criteria: . * * * must begin with' must be followed by one or more lower-case alphabetic characters, a space, and then one or more lower-case alphabetic characters must be followed by a pair of double quotation marks, optionally containing lower-case alphabetic letters must end with'>' and returns a list of all matching HTML tags

Explanation / Answer

Hi,

Option 2

The correct answer is option number 2 in your list of options.

Explanation- In the search string we have an opening tag'<' which means the string must begin with < character. After that we have '[a-z]+' which means 1 or more occurance of any small case alphabets from a to z. After that we have one space in the string, Post that we have '[a-z]+="' which means 1 or more occurance of small case alphabet followed by an equal to sign and a double quote sign. Post that we have '[a-z]*' which means 0 or more occurance of small case a to z letter. So it is not necessary that we need to have lettrs after double quotes. Finally, string should end with closing html tag >.