Gary Wessle wrote:
> ps. is there a online doc or web page where one enters a method and it
> returns the related docs?
The index to the library reference is one place:
http://docs.python.org/lib/genindex.html
and of course help() in the interactive interpreter...
Kent
--
http://mail.python.org
"Serge Orlov" <[EMAIL PROTECTED]> writes:
> Peter Otten wrote:
> > Gary Wessle wrote:
> >
> > >> These days str methods are preferred over the string module's functions.
> > >>
> > >> >>> text = "abc abc and Here and there"
> > >> >>> here_pos = text.find("Here")
> > >> >>> text.rfind("abc", 0, he
Serge Orlov wrote:
> Peter Otten wrote:
>> Gary Wessle wrote:
>>
>> >> These days str methods are preferred over the string module's
>> >> functions.
>> >>
>> >> >>> text = "abc abc and Here and there"
>> >> >>> here_pos = text.find("Here")
>> >> >>> text.rfind("abc", 0, here_pos)
>> >> 4
>> >>
>>
Peter Otten wrote:
> Gary Wessle wrote:
>
> >> These days str methods are preferred over the string module's functions.
> >>
> >> >>> text = "abc abc and Here and there"
> >> >>> here_pos = text.find("Here")
> >> >>> text.rfind("abc", 0, here_pos)
> >> 4
> >>
> >> Peter
> >
> > and what about when
Gary Wessle wrote:
>> These days str methods are preferred over the string module's functions.
>>
>> >>> text = "abc abc and Here and there"
>> >>> here_pos = text.find("Here")
>> >>> text.rfind("abc", 0, here_pos)
>> 4
>>
>> Peter
>
> and what about when python 3.0 is released and those deprec
Peter Otten <[EMAIL PROTECTED]> writes:
> Gary Wessle wrote:
>
> > I have a string like this
> >
> > text = "abc abc and Here and there"
> > I want to grab the first "abc" before "Here"
> >
> > import string
> > string.find(text, "Here") #
> >
> > I am having a problem with the next step.
>
Gary Wessle wrote:
> I have a string like this
>
> text = "abc abc and Here and there"
> I want to grab the first "abc" before "Here"
>
> import string
> string.find(text, "Here") #
>
> I am having a problem with the next step.
These days str methods are preferred over the string module's fun
text[:text.find('Here')].rfind('abc')
--
http://mail.python.org/mailman/listinfo/python-list
Hi
I have a string like this
text = "abc abc and Here and there"
I want to grab the first "abc" before "Here"
import string
string.find(text, "Here") #
I am having a problem with the next step.
thanks
--
http://mail.python.org/mailman/listinfo/python-list