[Tutor] Removing Content from Lines....
Sam Starfas
starfas_s at yahoo.com
Fri Mar 25 17:50:45 EDT 2016
Thanks to all who responded. I will try the suggestions and see if I can get the rest of my script to work.Thanks again for the tips. Will also read up on "len" and "index".
Cool stuff!
On Thursday, March 24, 2016 5:57 PM, Sam Starfas via Tutor <tutor at python.org> wrote:
Hello,I am hoping you experts can help out a newbie.I have written some python code to gather a bunch of sentences from many files. These sentences contain the content:
blah blah blah blah <uicontrol>1-up printing</uicontrol>blah blah blah blah blah blah blah blah
blah blah <uicontrol>Preset</uicontrol>blah blah blah blah
blah blah blah <uicontrol>Preset</uicontrol> blah blah blah
What I want to do is remove the words before the <uicontrol> and after the </uicontrol>. How do I do that in Python?
Thanks for any and all help.Sam
_______________________________________________
Tutor maillist - Tutor at python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list