> I'm trying match the lines that starting with someone variable in > 's'
In that case this is the simplest approach: >> for st in s: >> if line.startswith(st): do something That means that if you are reading the lines from a file you'd need a neted loop: for line in someFile: for substring in s: if line.startswith(substring): # do something here Alternatively a regular exression match as suggested by others is probably faster. Alan G. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor