I want to assign values to different indices and not in a sequential manner(by using append), like we would do in a hash table. How to initialize the array of a given size? What I do:
a=[]
for x in range(0,10000):
a.append(0)
Is there a better way? Also, is there any function like memset() in c++?