That's rather clever, Anand. My hackish solution to this sort of thing has usually been:

while 12 in a:
  a.remove(12)

Which I've normally used when removing blank strings from a recently split string.


--
Kiran Jonnalagadda
http://jace.seacrow.com/
http://jace.livejournal.com/

On 10-Jul-08, at 2:03 PM, Anand Balachandran Pillai wrote:

Here is what is arguably the solution with the least code.

a =  [12, 12, 1321, 34, 23, 12, 34, 45, 77]
list(set(a)-set([12]))
[1321, 34, 23, 45, 77]


Cheers

--Anand
_______________________________________________
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers

Reply via email to