Say I wanted to create an array (NOT list) of 1,000,000 twos in python, like this:
array = [2, 2, 2, ...... , 2]
What would be a fast but simple
aList = [2 for x in range(1000000)]
or base on chauncey link
anArray =array.array('i', (2 for i in range(0,1000000)))