fetching from a specified index in a set using python
Posted
by tipu
on Stack Overflow
See other posts from Stack Overflow
or by tipu
Published on 2010-06-02T00:50:29Z
Indexed on
2010/06/02
0:53 UTC
Read the original article
Hit count: 214
python
|pagination
I'm using pagination on a values from a set. So what this results in is me needing to get values from x to x + 20 which can be in the middle of a set with 50,000 entries. Is it possible that I can fetch these values by grabbing by the space in the set?
Would it make more sense to do
result = []
my_dict = dict(very_big_set)
for i in range(30000, 30020)
result.append(my_dict[i])
© Stack Overflow or respective owner