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