How do I indicate that an Array is an Array?

The code below is a script intended to yield a two dimensional array. However whenever I run the code It cannot splice the arrays because it thinks that thy are objects. I’ve written the same code in C# and Boo but get the same error.

import UnityEngine

class Chunk_assignment (MonoBehaviour):
        count = 20
	times = 20
	def Start ():
		world = []
		line_template = []
		for y in range(0,127):
		#sets up a template that is 128 long and consists entirely of '~'#
			line_template.Add('~')
		for x in range(0,127):
		#creates an arrray, the world, that is 128 lines of the template just created#
			world.Add(line_template)
		for x in range(count):
		#Creates 20 'X's at random inside the world#
			world[Random.Range(1,len(world)-2)][Random.Range(1,len(world[0])-2)] = 'X'
		for x in range(times):
			#makes the first and last lines empty to prevent errors when expanding#
			world[0] = line_template
			world[len(world)-1] = line_template
			for x in range(0,len(world)-1):
				world[0].Add('~')
				world[len(world)-1].Add('~')
			linenum = 0
			for line in world:
				newline = ['~']
				#cleans up the vartical edges (makes all entries '~')#
				for tilenum in range(1,len(world[linenum])-2):
					newline.Add(world[linenum][tilenum])
				world[linenum] = newline.Add('~')
				linenum += 1
			linenum = 0
			for line in world:
				tilenum = 0
				for tile in line:
					#planned code, currently not needed#
#					if tile == 'X' == world[Linenum+1][tilenum+1] == world[Linenum+1][tilenum] == world[Linenum+1][tilenum-1] == world[Linenum][tilenum+1] == world[Linenum][tilenum-1] == world[Linenum-1][tilenum+1] == world[Linenum-1][tilenum] == world[Linenum-1][tilenum-1]:
#						world[linenum][tilenum] = 'x'
					if tile == 'X':
						#for each X creates one new X near (or in) it#
						world[linenum+Random.Range(-1,1)][tilenum+Random.Range(-1,1)] = 'X'
					tilenum += 1
				linenum += 1
	def Update ():
		pass

You can’t change the size of arrays. Use a generic List instead.