On Jul 9, 2:24 am, "Rajanikanth Jammalamadaka" <[EMAIL PROTECTED]>
wrote:
> hi!
>
> Try this:
>
> >>> lis=['t','tes','test','testing']
> >>> [elem for elem in lis if re.compile("^te").search(elem)]
>
> ['tes', 'test', 'testing']
>
> Cheers,
>
> Raj
>
>
>
>
>
> On Wed, Jul 9, 2008 at 12:13 AM, Lamon
Rajanikanth Jammalamadaka a écrit :
(top-post corrected - Please, Rajanikanth, learn to trim"e properly,
and by all means avoid top-posting)
On Wed, Jul 9, 2008 at 12:13 AM, Lamonte Harris <[EMAIL PROTECTED]> wrote:
Alright, basically I have a list of words in a file and I load each word
from
hi!
Try this:
>>> lis=['t','tes','test','testing']
>>> [elem for elem in lis if re.compile("^te").search(elem)]
['tes', 'test', 'testing']
Cheers,
Raj
On Wed, Jul 9, 2008 at 12:13 AM, Lamonte Harris <[EMAIL PROTECTED]> wrote:
> Alright, basically I have a list of words in a file and I load eac
Alright, basically I have a list of words in a file and I load each word
from each line into the array. Then basically the question is how do I
check if the input word matches multiple words in the list.
Say someone input "test", how could I check if that word matches these list
of words:
test
t