I have got a list called words_list
that has around 28352 elements (words). Now I want to split this list into 29 different lists each having 1000 elements i.e, the first list would contain first 1000 words and the next list would contain next 1000 words from the words_list
and so on. I implemented this in the following manner,
split=[]
start=0
end=1000
for i in range(0,29):
temp=words_list[start:end]
split.append(temp)
start=start+1000
end=end+1000
The code is serving the purpose. I just want to know, is there any way to reduce the steps?