Thanks for all you guys. Now I got it.
To Steven,
I was in a little rush when I put this post. But you are right. It's not the
find method's problem.
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Aug 10, 2011 at 7:56 PM, Steven D'Aprano
wrote:
> On Thu, 11 Aug 2011 11:24 am Jim wrote:
>
>> Greetings, folks,
>>
>> I am using python 2.7.2. Here is something I got:
> a = 'popular'
> i = a.find('o')
> j = a.find('a')
> a[i:j]
>> 'opul'
>>
>> Well, I expected a[i:j] to b
On Thu, 11 Aug 2011 11:24 am Jim wrote:
> Greetings, folks,
>
> I am using python 2.7.2. Here is something I got:
a = 'popular'
i = a.find('o')
j = a.find('a')
a[i:j]
> 'opul'
>
> Well, I expected a[i:j] to be 'opula', and can't think of any reason why
> this is not happening
On Thu, Aug 11, 2011 at 2:48 AM, MRAB wrote:
> Python uses half-open ranges, which means that the start position is
> inclusive and the end position is exclusive.
>
Or if you prefer: Python identifies positions between characters,
rather than characters. And I agree that it's better than the
alte
On 11/08/2011 02:24, Jim wrote:
Greetings, folks,
I am using python 2.7.2. Here is something I got:
a = 'popular'
i = a.find('o')
j = a.find('a')
a[i:j]
'opul'
Well, I expected a[i:j] to be 'opula', and can't think of any reason
why this is not happening. So, can anybody help me out about thi