SoFunction
Updated on 2024-10-30

Two methods for python list de-duplication


# The first one #
def delRepeat(liebiao):
 for x in liebiao:
  while (x)>1:
   del liebiao[(x)]
 return liebiao

# The second one can't maintain the original order
liebiao=set(liebiao)