#NEWLINE# def count( func , l ) : #NEWLINE# #INDENT# 'Return the number of items in l for which func returns true.' #NEWLINE# n = 0 #NEWLINE# for x in l : #NEWLINE# #INDENT# if func ( x ) : #NEWLINE# #INDENT# n += 1 #NEWLINE# #UNINDENT# #UNINDENT# return n