Python has a large list, and now I want to remove the value from the list while taking the value from the list

this big list data adds 100w pieces of data, take 1000 pieces of data from this big list at a time, and delete it from the list
at present, my solution is:

a = range(1000000)
b=[]
for i in range(1000):
    b.append(a.pop())

feels that this method is a bit hillbilly, is there a better way

Menu