1>>> n = 5 #length of list
2>>> list = [None] * n #populate list, length n with n entries "None"
3>>> print(list)
4[None, None, None, None, None]
5
6>>> list.append(1) #append 1 to right side of list
7>>> list = list[-n:] #redefine list as the last n elements of list
8>>> print(list)
9[None, None, None, None, 1]
10
11>>> list.append(1) #append 1 to right side of list
12>>> list = list[-n:] #redefine list as the last n elements of list
13>>> print(list)
14[None, None, None, 1, 1]
15
16>>> list.append(1) #append 1 to right side of list
17>>> list = list[-n:] #redefine list as the last n elements of list
18>>> print(list)
19[None, None, 1, 1, 1]
20
1numpy.array([0] * n) #creates an int64 numpy array of size n with each element having a vaule of 0
2numpy.array([0] * n, dtype = '<type>') #creates a numpy array of size n with a type of <type>
1array1 = [] #an empty array
2array2 = list() #another empty arrat
3array3 = ["1", "2", "3"] #array initialization with value
4arrat4 = [x for x in range(1,11) #list comprehension