def set_extend(l, index, item, emptyValue=None):
 if (index >= len(l)):
  l += ([emptyValue] * ((index - len(self)) + 1))
 l[index] = item

def set_extend ( l , index , item , emptyValue = None ) : if ( index >= len ( l ) ) : l += ( [ emptyValue ] * ( ( index - len ( self ) ) + 1 ) ) l [ index ] = item
sets l[index] = item .