alex23 wrote:
Gerard Flanagan grflana...@gmail.com wrote:
def count(text, *args):
Other than the ability to handle multiple substrings, you do realise
you've effectively duplicated str.count()?
I realise that calling this count function with a single argument would
be functionally
En Tue, 27 Oct 2009 04:31:22 -0300, Gerard Flanagan grflana...@gmail.com
escribió:
alex23 wrote:
Gerard Flanagan grflana...@gmail.com wrote:
def count(text, *args):
Other than the ability to handle multiple substrings, you do realise
you've effectively duplicated str.count()?
I realise
Gerard Flanagan grflana...@gmail.com wrote:
I realise that calling this count function with a single argument would
be functionally identical to calling str.count(), yes. But I can imagine
the situation of wanting to find multiple (disjoint) substrings. Is
there a reason for preferring
Peng Yu wrote:
For example, the long string is 'abcabc' and the given string is
'abc', then 'abc' appears 2 times in 'abcabc'. Currently, I am calling
'find()' multiple times to figure out how many times a given string
appears in a long string. I'm wondering if there is a function in
python
Gerard Flanagan grflana...@gmail.com wrote:
def count(text, *args):
Other than the ability to handle multiple substrings, you do realise
you've effectively duplicated str.count()?
--
http://mail.python.org/mailman/listinfo/python-list
For example, the long string is 'abcabc' and the given string is
'abc', then 'abc' appears 2 times in 'abcabc'. Currently, I am calling
'find()' multiple times to figure out how many times a given string
appears in a long string. I'm wondering if there is a function in
python which can directly
On Fri, Oct 23, 2009 at 7:31 PM, Peng Yu pengyu...@gmail.com wrote:
For example, the long string is 'abcabc' and the given string is
'abc', then 'abc' appears 2 times in 'abcabc'. Currently, I am calling
'find()' multiple times to figure out how many times a given string
appears in a long
Peng Yu wrote:
For example, the long string is 'abcabc' and the given string is
'abc', then 'abc' appears 2 times in 'abcabc'. Currently, I am calling
'find()' multiple times to figure out how many times a given string
appears in a long string. I'm wondering if there is a function in
python