def initAndWrite2_test():
    x = [None for _ in range(10000)]
for i in range(10000):
    x[i] = i

def appendWrite_test():
    x = []
for i in range(10000):
    x.append(i)
How to create a fix size list in python?