do - loop
Jeroen Ruigrok van der Werven
asmodai at in-nomine.org
Mon Jan 7 10:00:35 CET 2008
-On [20080107 09:51], Hita Vora (hvora at usc.edu) wrote:
>I have a dataset which has about 3000 subjects in it. I take each subject
>and perform 3 to 4 geoprocessing tasks on it. Currently I have a model where
>I manually feed in each subject's ID and then the rest of the process is
>automated. I would like to automate the process such that it would
>automatically select another subject after the process has been completed on
>a specfic subject. ie to repeat the same process on each of the IDs.
Well, hopefully I understood you correctly, but if we assume that the dataset
is a simple list you can iterate over it as thus:
for subject in dataset:
Dictionaries and other datatypes have similar means to construct an iterator.
Is this a bit what you want to achieve?
Jeroen Ruigrok van der Werven <asmodai(-at-)in-nomine.org> / asmodai
イェルーン ラウフロック ヴァン デル ウェルヴェン
http://www.in-nomine.org/ | http://www.rangaku.org/
More information about the Python-list