Re: Better way to isolate string

2007-05-11 Thread HMS Surprise
On May 11, 10:45 am, Tim Golden <[EMAIL PROTECTED]> wrote: > HMS Surprise wrote: > > I suppose a one liner would look better, but I am alway leery of these > > things 'breaking'. > > > t = s.split('">')[-1].split('<')[0] > > s ='G132153' > > Only if you're competing in an obscurity competition ;) >

Re: Better way to isolate string

2007-05-11 Thread Tim Golden
HMS Surprise wrote: > I suppose a one liner would look better, but I am alway leery of these > things 'breaking'. > > t = s.split('">')[-1].split('<')[0] > s ='G132153' Only if you're competing in an obscurity competition ;) If you're really confined to built-ins (ie you can't import a single mo

Re: Better way to isolate string

2007-05-11 Thread HMS Surprise
I suppose a one liner would look better, but I am alway leery of these things 'breaking'. t = s.split('">')[-1].split('<')[0] s ='G132153' jh -- http://mail.python.org/mailman/listinfo/python-list