Doing multiple queries with a loop

I work on ArcGIS 9.3 and I'd want to execute many queries in a row with Python.

Actually I have a layer, called "lines" that contains all the bus lines of a city. And my question is : how to save each line in a different layer ? I thought the best thing to do would be : - a query by attributes : field used : "blines". Characterizes the number of the lines (1, 2, 3 and so on)- and then to save each query in a distinct layer

A good solution would be a loop in order to make the computation faster but I don't really know how to do.

I tried to make that script but I guess I'm very far from the right result :

Oh, sorry - didn't see you're on 9.3. Arcpy only works on 10. You can basically use the same script format, just substitute arcgisscripting for arcpy and create the geoprocessor object as you did above.