def m_assign(llst, rlst, lslices, rslices):
 if atomp(rlst):
  return rlst
 rlst = [m_assign(l, r, lslices[1:], rslices[1:]) for (l, r) in zip(llst[lslices[0]], rlst[rslices[0]])]
 llst[lslices[0]] = rlst
 return llst

def m_assign ( llst , rlst , lslices , rslices ) : if atomp ( rlst ) : return rlst rlst = [ m_assign ( l , r , lslices [ 1 : ] , rslices [ 1 : ] ) for ( l , r ) in zip ( llst [ lslices [ 0 ] ] , rlst [ rslices [ 0 ] ] ) ] llst [ lslices [ 0 ] ] = rlst return llst
multi-dimensional slice assignment: llst and rlst are the operands .