Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

iterate over batch of dict keys at once python

import itertools

def chunked(it, size):
    it = iter(it)
    while True:
        p = tuple(itertools.islice(it, size))
        if not p:
            break
        yield p
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #iterate #batch #dict #keys #python
ADD COMMENT
Topic
Name
7+6 =