That array is not sparse. It has 4322 elements.
In Python, the following would create a similar construct:
a = [ None for i in range( 4321 ) ] + [ "blah" ]
If you want to set an element of an array that might be beyond the end of an existing array, @OmnipotentEntity proposed this function.
def set_at( xs, idx, x, default=None ):
if len( xs ) <= idx:
xs.extend( [ default ] * ( idx - len( xs ) + 1 ) )
xs[ idx ] = x
a = [ ]
set_at( a, 4321, "blah" )
If you truly want something sparse, you can use a dictionary with integer keys.
a = { }
a[ 4321 ] = "blah"