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

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b32685-2be05.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b32685-2be05.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?