nerdexam
GIAC

GPYC · Question #29

What is the output when the following commands are typed in Python interactive mode? >>> import re >>> re.findall(r"tag.*tag", "i want tag to go tag to sans tag")

Sign in or unlock GPYC to reveal the answer and full explanation for question #29. The question stem and answer options stay visible for context.

Web Scraping & Forensics with Python

Question

What is the output when the following commands are typed in Python interactive mode?
import re re.findall(r"tag.*tag", "i want tag to go tag to sans tag")

Options

  • A['tag to go tag', 'to sans tag']
  • B['tag to go tag', 'to sans tag']
  • C['tag to go tag']
  • D['tag to go tag to sans tag']

Unlock GPYC to see the answer

You've previewed enough free GPYC questions. Unlock GPYC for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#regular expressions#re module#greedy matching#findall
Full GPYC Practice