Re: Array delete

2007-02-08 Thread Kent Johnson
azrael wrote: if you are new to python then this will be easier to understand. if you change this a liitle bit (depending on syntax) it should work in any language. just copy and paste to a .py file Yikes. If you are new to Python please ignore this un-Pythonic abomination. Check(listItem,

Array delete

2007-02-07 Thread Scripter47
Hey, Can someone plz make a function for that takes a array, and then search in it for duplicates, if it finds 2 or more items thats the same string then delete all except 1. Short: it deletes all duplicates in a array thanks -- http://mail.python.org/mailman/listinfo/python-list

Array delete

2007-02-07 Thread Andreas Lysdal
Hey, Can someone plz make a function for that takes a array, and then search in it for duplicates, if it finds 2 or more items thats the same string then delete all except 1. Short: it deletes all duplicates in a array thanks -- _.____

Re: Array delete

2007-02-07 Thread Jerry Hill
On 1/28/07, Scripter47 [EMAIL PROTECTED] wrote: Can someone plz make a function for that takes a array, and then search in it for duplicates, if it finds 2 or more items thats the same string then delete all except 1. myList = [1, 1, 2, 4, 8, 8, 8, 8, 8, 8, 10] myList = list(set(myList))

Re: Array delete

2007-02-07 Thread Steven Bethard
Jerry Hill wrote: On 1/28/07, Scripter47 [EMAIL PROTECTED] wrote: Can someone plz make a function for that takes a array, and then search in it for duplicates, if it finds 2 or more items thats the same string then delete all except 1. myList = [1, 1, 2, 4, 8, 8, 8, 8, 8, 8, 10] myList

Re: Array delete

2007-02-07 Thread azrael
if you are new to python then this will be easier to understand. if you change this a liitle bit (depending on syntax) it should work in any language. just copy and paste to a .py file def main(): list, temp = [1, 1, 2, 4, 8, 8, 8, 8, 8, 8, 10], [] for i in range(len(list)): if