Grant,

> My question is, is it possible to strip out multiple characters at once? 

Kent answered that bit.

> started = False

> for line in file('mylist.py'):
>     if 'jobs' in line and not started:
> ...
>    if ']' not in line and started:
>        
jobs.append(line.strip('...'))
>    else: print "break"

Are you sure you only want to print break? If so the code will 
continue processing lines after the end of your list. My break 
command will exit the loop when it finds the ] character. If you 
don't want to use break you could set started to False again.


Alan G.




        
        
                
___________________________________________________________ 
New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at 
the Yahoo! Mail Championships. Plus: play games and win prizes. 
http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk 
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to