Hi all,
I'm trying to find some code that, given a string, will allow me to iterate over each line using the for loop construct, but with the added requirement that separate for loop constructs will not reset the iteration back to the beginning.
At the moment I have
sList = [line for line in theString.split(os.linesep)]
for line in SList
... do stuff
But successive for loops will reset the iteration back to the beginning.
Does something in python exist for this, or will I have to write one from scratch?
Thanks
Tarsa