Hi All
I am trying to find out the duplicates in a list
, as for beginning I wanted to compare the adjacent
elements in list , for this purpose I wrote a script
for checking the adjacent elements in a list, if same
, it prints the result that , the adjacent numbers are
same , it not it wi
Hi,
Look at this:
>>> i=[1,2,3]
>>> i[len(i)]
Traceback (most recent call last):
File "", line 1, in ?
IndexError: list index out of range
This means that I have tried to access an element that is out of the
list, in this case i[3], that is, the 4th element of the list.
You are doing the
--- Guillermo Fernandez Castellanos
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> Look at this:
> >>> i=[1,2,3]
> >>> i[len(i)]
> Traceback (most recent call last):
>File "", line 1, in ?
> IndexError: list index out of range
>
>
> This means that I have tried to access an element
> that is out o
John Joseph said unto the world upon 08/01/06 06:36 AM:
> --- Guillermo Fernandez Castellanos
> <[EMAIL PROTECTED]> wrote:
>
>
>>Hi,
>>
>>Look at this:
>> >>> i=[1,2,3]
>> >>> i[len(i)]
>>Traceback (most recent call last):
>> File "", line 1, in ?
>>IndexError: list index out of range
>>
>>
>>T
Hi Brian
It was a excellent tutorial, Thanks a
lot for the advice I got my concepts of def of
functions , sort functions , count , cleared for me
I was able to do and understand all the
function example , except item_comparison function
I get the er
John Joseph said unto the world upon 09/01/06 03:47 AM:
> Hi Brian
> It was a excellent tutorial, Thanks a
> lot for the advice I got my concepts of def of
> functions , sort functions , count , cleared for me
>I was able to do and understand all the
> function
Brian van den Broek wrote:
> Your python is a version before set was a built-in type (2.4, I
> believe). So, the iteration_comparison *and* dupe_detector_5 functions
> won't work for you.
>
> 2.3 did include the sets module, though.
>
> So, stick
>
> from sets import set
>
> at the top of the
> lot for the advice I got my concepts of def of functions , sort
> functions , count , cleared for me
>I was able to do and understand all the
> function example , except �item_comparison� function
>I get the error for set
> >>> set((1,1,1,2,2,2,2,2,3,4,4,5))
> Trac
--- Danny Yoo <[EMAIL PROTECTED]> wrote:
> >I get the error for set
> > >>> set((1,1,1,2,2,2,2,2,3,4,4,5))
> > Traceback (most recent call last):
> > File "", line 1, in ?
> > NameError: name 'set' is not defined
>
> Hi John,
>
> For Python 2.3.4, you'll need to add the line:
>