I want to slice my big list into multiple lists on the basis of index numbers, Python

后端 未结 0 780
春和景丽
春和景丽 2020-12-22 02:15

for example

def createList(r1, r2): 
    return [item for item in range(r1, r2+1)]
hundredList = createList(1, 100)    #this list would be simple = (1,2,3,4..         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题