(variable)
return newVariable
Remove duplicate values of an environment variable.
Remove duplicate values of an environment variable.
Remove duplicate values of an environment variable .
def removeDuplicates(variable):
    """Remove duplicate values of an environment variable.
    """
    oldList = variable.split(os.pathsep)
    newList = []
    for i in oldList:
        if i not in newList:
            newList.append(i)
    newVariable = os.pathsep.join(newList)
    return newVariable
def removeDuplicates ( variable ) : oldList = variable . split ( os . pathsep ) newList = [ ] for i in oldList : if i not in newList : newList . append ( i ) newVariable = os . pathsep . join ( newList ) return newVariable