I am trying out python, basically newbie. What I wanted to do is to save or store all generated list into one list and access that list later. The list is generated from a loop.
Basically my code is:
def doSomething():
list = []
....some parsing procedures....
......
...here needed texts are extracted...
...so I am looping to extract all texts I need...
for a in something:
list.append(a)
After the first execution, list is now populated... then the program proceeds into the next page which is basically the same structure and then again invoke the doSomething function. I hope this is now clear..
Assuming the first, second and third loop etc. generated this:
1st loop: [1,2,3]
2nd loop: [4,5,6]
3rd loop: [7,8,9]
I wanted to save these lists into one list and access it later so that:
alllist = [1,2,3,4,5,6,7,8,9]
How can I achieve this?