I have a list which may be of any length. I have a method which calculates results for 50 elements at a time. I want to use the list in that manner such that for every iteration i get the next 50 elements.
What is did is, with the length of the list i calculated the no of times my loop should iterate,
count = math.ceil(len(newList)/float(50))
how should i iterate such that i can get the next 50 elements every iteration?
for c in range(0,count):
newList[:50]
how to get the next 50 and then next 50 ?