Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

len of iterator python

iter = (i for i in range(50))
len = sum(1 for _ in iter)
# len = 50
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #len #iterator #python
ADD COMMENT
Topic
Name
1+5 =