parameters: (n, iterable)
return_statement: return ret
docstring: Divide the elements from *iterable* into *n* parts, maintaining
      order.
  
          >>> group_1, group_2 = divide(2, [1, 2, 3, 4, 5, 6])
          >>> list(group_1)
          [1, 2, 3]
          >>> list(group_2)
          [4, 5, 6]
  
      If the length of *iterable* is not evenly divisible by *n*, then the
      length of the returned iterables will not be identical:
  
          >>> children = divide(3, [1, 2, 3, 4, 5, 6, 7])
          >>> [list(c) for c in children]
          [[1, 2, 3], [4, 5], [6, 7]]
  
      If the length of the iterable is smaller than n, then the last returned
      iterables will be empty:
  
          >>> children = divide(5, [1, 2, 3])
          >>> [list(c) for c in children]
          [[1], [2], [3], [], []]
  
      This function will exhaust the iterable before returning and may require
      significant storage. If order is not important, see :func:`distribute`,
      which does not first pull the iterable into memory.
docstring_summary: Divide the elements from *iterable* into *n* parts, maintaining
      order.
docstring_tokens: Divide the elements from * iterable * into * n * parts maintaining order .
function: def divide(n, iterable):
      """Divide the elements from *iterable* into *n* parts, maintaining
      order.
  
          >>> group_1, group_2 = divide(2, [1, 2, 3, 4, 5, 6])
          >>> list(group_1)
          [1, 2, 3]
          >>> list(group_2)
          [4, 5, 6]
  
      If the length of *iterable* is not evenly divisible by *n*, then the
      length of the returned iterables will not be identical:
  
          >>> children = divide(3, [1, 2, 3, 4, 5, 6, 7])
          >>> [list(c) for c in children]
          [[1, 2, 3], [4, 5], [6, 7]]
  
      If the length of the iterable is smaller than n, then the last returned
      iterables will be empty:
  
          >>> children = divide(5, [1, 2, 3])
          >>> [list(c) for c in children]
          [[1], [2], [3], [], []]
  
      This function will exhaust the iterable before returning and may require
      significant storage. If order is not important, see :func:`distribute`,
      which does not first pull the iterable into memory.
  
      """
      if n < 1:
          raise ValueError('n must be at least 1')
  
      seq = tuple(iterable)
      q, r = divmod(len(seq), n)
  
      ret = []
      for i in range(n):
          start = (i * q) + (i if i < r else r)
          stop = ((i + 1) * q) + (i + 1 if i + 1 < r else r)
          ret.append(iter(seq[start:stop]))
  
      return ret
function_tokens: def divide ( n , iterable ) : if n < 1 : raise ValueError ( 'n must be at least 1' ) seq = tuple ( iterable ) q , r = divmod ( len ( seq ) , n ) ret = [ ] for i in range ( n ) : start = ( i * q ) + ( i if i < r else r ) stop = ( ( i + 1 ) * q ) + ( i + 1 if i + 1 < r else r ) ret . append ( iter ( seq [ start : stop ] ) ) return ret