When matching totals hide incorrect records

A router receives 28 distinct record identifiers (IDs). Its requirement is to place every incoming ID in exactly one of two lists: sent or queued. Every ID in either list belongs to this batch, and neither list contains internal duplicates. The sent list contains 19 IDs, the queued list contains 9 IDs, and 2 IDs appear in both lists. With assertions enabled, what does the following check establish?


Python
assert len(sent) + len(queued) == 28


Two overlapping lists contain identifiers from one incoming batch.


Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Exceptions and Assertions Questions: