def insert_many(seq, where, val):
 seq = list(seq)
 result = []
 for i in range((len(where) + len(seq))):
  if (i in where):
   result.append(val)
  else:
   result.append(seq.pop(0))
 return tuple(result)

def insert_many ( seq , where , val ) : seq = list ( seq ) result = [ ] for i in range ( ( len ( where ) + len ( seq ) ) ) : if ( i in where ) : result . append ( val ) else : result . append ( seq . pop ( 0 ) ) return tuple ( result )
insert multiple documents .