On Thu, 06 Sep 2007 16:48:31 -0700, Zentrader wrote:
> On Sep 6, 12:47 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>> On Wed, 05 Sep 2007 22:54:55 -0700, TheFlyingDutchman wrote:
>> > To do a "*string" wildcard filter use the endswith() function instead
>> > of startswith() and to do a
En Thu, 06 Sep 2007 22:19:56 -0300, TheFlyingDutchman <[EMAIL PROTECTED]>
escribi�:
> The Perl community has an expression "There is more than one way to do
> it". As in, Perl is good because you have multiple choices (whether
> it's a function/module/class/operator) of how to implement a
> part
On Sep 6, 5:53 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Thu, 06 Sep 2007 20:48:31 -0300, Zentrader <[EMAIL PROTECTED]>
> escribi?:
>
> > On Sep 6, 12:47 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>
> >> Maybe better the ``in`` operator for the '*string*' type. `str.find
En Thu, 06 Sep 2007 20:48:31 -0300, Zentrader <[EMAIL PROTECTED]>
escribi�:
> On Sep 6, 12:47 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>>
>> Maybe better the ``in`` operator for the '*string*' type. `str.find()`
>> will go away in the future.
>
> string.find serves a useful purpos
On Sep 6, 12:47 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Wed, 05 Sep 2007 22:54:55 -0700, TheFlyingDutchman wrote:
> > To do a "*string" wildcard filter use the endswith() function instead
> > of startswith() and to do a *string* type wildcard filter use
> > the find() function
On Wed, 05 Sep 2007 22:54:55 -0700, TheFlyingDutchman wrote:
> To do a "*string" wildcard filter use the endswith() function instead
> of startswith() and to do a *string* type wildcard filter use
> the find() function > -1.
Maybe better the ``in`` operator for the '*string*' type. `str.find()`
Sreeraj schrieb:
> hi,
>
> I am a beginner in Python. I wish to know how can i filter a list of
> strings using wild characters.ie
> Lets say i have list countries =
> ["india","africa","atlanta","artica","nigeria"]. I need only the list
> of string starting with 'a'.
While the startswith-method
On Sep 5, 10:00 pm, Sreeraj <[EMAIL PROTECTED]> wrote:
> hi,
>
> I am a beginner in Python. I wish to know how can i filter a list of
> strings using wild characters.ie
> Lets say i have list countries =
> ["india","africa","atlanta","artica","nigeria"]. I need only the list
> of string starting w
i will this may help you.
countries = ["india","africa","atlanta","artica","nigeria"]
filter(lambda country: country.startswith('a'), countries)
--
http://mail.python.org/mailman/listinfo/python-list
i hope this may help you.
countries = ["india","africa","atlanta","artica","nigeria"]
filtered = filter(lambda item: item.startswith('a'), l)
--
http://mail.python.org/mailman/listinfo/python-list
On 9/6/07, Sreeraj <[EMAIL PROTECTED]> wrote:
> hi,
>
> I am a beginner in Python. I wish to know how can i filter a list of
> strings using wild characters.ie
> Lets say i have list countries =
> ["india","africa","atlanta","artica","nigeria"]. I need only the list
> of string starting with 'a'.
hi,
I am a beginner in Python. I wish to know how can i filter a list of
strings using wild characters.ie
Lets say i have list countries =
["india","africa","atlanta","artica","nigeria"]. I need only the list
of string starting with 'a'.
thank you
Sreeraj
--
http://mail.python.org/mailman/li
12 matches
Mail list logo