#NEWLINE# def ilen( seq ) : #NEWLINE# #INDENT# '\n    Consume an iterable not reading it into memory; return the number of items.\n    ' #NEWLINE# counter = count ( ) #NEWLINE# deque ( izip ( seq , counter ) , maxlen = 0 ) #NEWLINE# return next ( counter )