If you are processing them one by one and do not need to store them all in memory, you can write the contents to a disk file first, then open it and use a statement similar to the following:
for item in file('xxx.txt').xreadlines():
... # 解析出你的内容,并处理
Does this
list
have to be stored in memory?If you are processing them one by one and do not need to store them all in memory, you can write the contents to a disk file first, then open it and use a statement similar to the following: