Examers.io
ExamsOrganizationsHow it worksPricingHelp & FAQ
Python Institute logo

Python InstitutePCAP - Certified Associate Python Programmer

Domain 5Objective 1

PCAP-31-03 5.1 Build Complex Lists Using List Comprehensions PCAP-31 Practice Questions (Page 2)

Part of the Miscellaneous (List Comprehensions, Lambdas, Closures, I/O) domain, which accounts for 22% of the PCAP-31 exam. Python Institute does not publish an official question count, but from its 65-minute exam (~25–45 total, ~6–10 in this domain), expect 1–2 from this objective — we provide 43 practice questions to prepare you well beyond it. (estimate)

43questions here
9free pages
2concepts
22%of the exam

Questions 6–10

  1. 6application · medium

    A data engineer has a list of lists of numbers and wants to create a list of the sums of each inner list, but only for inner lists that have at least one even number. Which nested comprehension does this?

    Select an answer first
  2. 7application · medium

    A developer wants to create a list of all lowercase letters in a string, but only if they are vowels. They want a list comprehension. Which one is correct?

    Select an answer first
  3. 8application · medium

    A developer wants to create a list of all pairs (i, j) where i is from 1 to 3 and j is from 1 to 3, but only where i is less than j. They want a flat list of tuples. Which comprehension is correct?

    Select an answer first
  4. 9expert · hard

    A developer is refactoring a loop that builds a list of squares of even numbers from 0 to 100. They want to use a list comprehension, but they also need to ensure the code is as efficient as possible. Which comprehension is most efficient?

    Select an answer first
  5. 10expert · hard

    A developer needs to flatten a list of lists, but only include elements that are integers (not strings or floats). They also want to preserve the order. Which comprehension is correct and most efficient?

    Select an answer first
Finished these 5 questions?

Review the revealed explanations, or continue through the curriculum.

Free Basic Practice is a study aid with revealable answers — not a scored exam. Examers.io is independent and not affiliated with or endorsed by Python Institute. “PCAP-31” is a trademark of its owner, used for identification only.