What is the output when the following commands are typed in Python interactive mode?
What is the output when the following commands are typed in Python interactive mode?
The output of the command re.findall(r"tag.*tag", "i want tag to go tag to sans tag") in Python is ['tag to go tag to sans tag']. The regular expression r"tag.*tag" matches the shortest string that starts with "tag" and ends with "tag", including everything in between. In this case, the entire substring "tag to go tag to sans tag" is matched.
D. I ran the code :)
ran code
Answer is D. There isn't a comma in the string either. Python confirms this.
Yeah thought it was wrong and confirmed as bighead12 did. The answer is D.
D is the answer