I got a function like
def f():
...
...
return [list1, list2]
returns a list of lists
[[list1.item1,list1.item2,...],[list2.item1,list2.item2,...]]
now when i do the following:
for i in range(0,2):print f()[i][0:10]
it works and prints lists of chopped
but if i do
print f()[0:2][0:10]
then it prints lists that ignore the slice [0:10].
Is there a way to make the second form work, or do I need to cyclically get the desired result every time?
source
share