Index Error

Dave Angel d at davea.name
Tue Nov 20 15:39:31 CET 2012


On 11/20/2012 09:11 AM, inshu chauhan wrote:
> On Tue, Nov 20, 2012 at 3:00 PM, Chris Angelico <rosuav at gmail.com> wrote:
>
>> On Wed, Nov 21, 2012 at 12:57 AM, inshu chauhan <insideshoes at gmail.com>
>> wrote:
>>> I am using python 2.7.3 , so can it be done in that ?
>> (Please don't top-post; just delete the couple of blank lines that
>> gmail oh so kindly provides, and type your response at the bottom. You
>> may also want to consider trimming the quoted text to just what you
>> actually need.)
>>
>> Yes, it certainly can. Go to the docs page I linked to, then up the
>> top left you'll see this:
>>
>>  Python » 3.3.0  Documentation
>>
>> with the "3.3.0" part a drop-down list. Drop it down and select 2.7,
>> and you'll see the equivalent page for version 2.7.3.
>>
>> Have fun!
>>
>> ChrisA
>> --
>> http://mail.python.org/mailman/listinfo/python-list
>>
>
> Ok.. Thanks a ton ...
>
>
>

The catch to the approach suggested by Chris is that you DON'T want to
break out of the whole loop when one value is out of range.  You only
want to skip that one point.



-- 

DaveA



More information about the Python-list mailing list