On Saturday, September 28, 2013 11:17:19 AM UTC-7, Tim Chase wrote:
> [mercy, you could have trimmed down that reply]
>
>
>
> On 2013-09-28 10:43, cerr wrote:
>
> > On Saturday, September 28, 2013 4:54:35 PM UTC, Tim Chase wrote:
>
> >> import re
>
> >
>
> > Great, only I don't have the re
On Saturday, September 28, 2013 11:07:11 AM UTC-7, MRAB wrote:
> On 28/09/2013 18:43, cerr wrote:
>
> [snip]
>
> > Great, only I don't have the re module on my system :(
>
> >
>
> Really? It's part of Python's standard distribution.
Oh no, sorry, mis-nformation, i DO have module re availab
[mercy, you could have trimmed down that reply]
On 2013-09-28 10:43, cerr wrote:
> On Saturday, September 28, 2013 4:54:35 PM UTC, Tim Chase wrote:
>> import re
>
> Great, only I don't have the re module on my system :(
Um, it's a standard Python library. You sure about that?
http://docs
On 28/09/2013 18:43, cerr wrote:
[snip]
Great, only I don't have the re module on my system :(
Really? It's part of Python's standard distribution.
--
https://mail.python.org/mailman/listinfo/python-list
On Saturday, September 28, 2013 4:54:35 PM UTC, Tim Chase wrote:
> On 2013-09-28 09:11, cerr wrote:
>
> > I have a list of sentences and a list of words. Every full word
>
> > that appears within sentence shall be extended by i.e. "I
>
> > drink in the house." Would become "I in the ." (and
>
MRAB writes:
> On 28/09/2013 17:11, cerr wrote:
> > Hi,
> >
> > I have a list of sentences and a list of words. Every full word
> > that appears within sentence shall be extended by i.e. "I
> > drink in the house." Would become "I in the ." (and
> > not "I in the .")I have attempted it like thi
On 28/09/2013 17:11, cerr wrote:
Hi,
I have a list of sentences and a list of words. Every full word that appears within sentence shall be extended by i.e. "I
drink in the house." Would become "I in the ." (and not "I in the
.")I have attempted it like this:
for sentence in sentences:
On 2013-09-28 09:11, cerr wrote:
> I have a list of sentences and a list of words. Every full word
> that appears within sentence shall be extended by i.e. "I
> drink in the house." Would become "I in the ." (and
> not "I in the .")
This is a good place to reach for regular expressions. It com
Hi,
I have a list of sentences and a list of words. Every full word that appears
within sentence shall be extended by i.e. "I drink in the house." Would
become "I in the ." (and not "I in the .")I have
attempted it like this:
for sentence in sentences:
for noun in nouns:
if " "+n