nerdexam
GIAC

GPYC · Question #41

Review the following Python code: hr = set([('Smith', 'Johnson', 'Williams', 'Jones')]) it = set(['Johnson', 'Jones', 'Brown']) x = hr.intersection(it)

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

Python Fundamentals & Command Line Tools

Question

Review the following Python code: hr = set([('Smith', 'Johnson', 'Williams', 'Jones')]) it = set(['Johnson', 'Jones', 'Brown']) x = hr.intersection(it)

Options

  • A'Jones', 'Johnson'
  • B'Brown'/'Williams'
  • C'Brown'/ 'Jones','Johnson','Williams'
  • D'Johnson'/ 'JohnsonVilliams'/'Jones'/'Jones'/'Brown'

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

#sets#intersection#tuple vs list#collections
Full GPYC Practice