this is probably too simple of a question, but here I go.
I have paginated items, each page contains 100 items. The program fetches items till it reaches the item index specified within item_num
This is what I have:
item_num = 56
range(0, item_num/100 + (item_num%100 > 0)):
get_next_100()
I’m not really sure about the (item_num%100 > 0) boolean I used.
Is there anything wrong with what I did?
range takes a 3rd optional parameter of step.
So
Gives
So you can do something like