def nub(x):
    """Deletes all duplicates from a list"""
    new = []
    new .append(x[0])
    for x1 in range(1, len(x)):
        if x[x1] in new:
            pass
        if x[x1] not in new:
            new.append(x[x1])
    return new