code: def exactly_n(l, n=1):
      '''
      Tests that exactly N items in an iterable are "truthy" (neither None,
      False, nor 0).
      '''
      i = iter(l)
      return all(any(i) for j in range(n)) and not any(if exactly_n(l, n=1):
      '''
      Tests that exactly N items in an iterable are "truthy" (neither None,
      False, nor 0).
      '''
      i = iter(l)
      return all(any(i) for j in range(n)) and not any(i)
docs: Tests that exactly N items in an iterable are "truthy" (neither None,
      False, nor 0).