def count_dates(date, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[1] == date:
            count += 1
    return count

def unique_day(date, possible_birthdays):
    if count_dates(date, possible_birthdays) == 1:
        return True
    else:
        return False

def count_months(month, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[0] == month:
            count += 1
    return count

def unique_month(month, possible_birthdays):
    if count_months(month, possible_birthdays) == 1:
        return True
    else:
        return False

def days(month, possible_birthdays):
    days_in_month = ()
    for i in possible_birthdays:
        if i[0] == month:
            days_in_month += (i[1],)
    return days_in_month

def contains_unique_day(month, possible_birthdays):
    for x in range(len(days(month, possible_birthdays))):
        if unique_day(days(month, possible_birthday)[x], possible_birthdays):
            return True
        else:
            return False


def count_dates(date, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[1] == date:
            count += 1
    return count

def unique_day(date, possible_birthdays):
    if count_dates(date, possible_birthdays) == 1:
        return True
    else:
        return False

def count_months(month, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[0] == month:
            count += 1
    return count

def unique_month(month, possible_birthdays):
    if count_months(month, possible_birthdays) == 1:
        return True
    else:
        return False

def days(month, possible_birthdays):
    days_in_month = ()
    for i in possible_birthdays:
        if i[0] == month:
            days_in_month += (i[1],)
    return days_in_month

def contains_unique_day(month, possible_birthdays):
    for x in days(month, possible_birthdays):
        if unique_day(days(month, possible_birthday)[x], possible_birthdays):
            return True
        else:
            return False

tuple_of_possible_birthdays = (('May', '15'),
                              ('May', '16'),
                              ('May', '19'),
                              ('June', '17'),
                              ('June', '18'),
                              ('July', '14'),
                              ('July', '16'),
                              ('August', '14'),
                              ('August', '15'),
                              ('August', '17'))

assert unique_day("1", (("January","1"),("February","1")))==False and unique_month("January", (("January","1"),("January","2")))==False and unique_month("January", (("January","1"),("February","1")))==True and contains_unique_day("January", (("January","1"),("January","2")))==True and contains_unique_day("January", (("January","1"),("February","1")))==False and contains_unique_day("February", (("January","10"),("February","1"),("February","10")))==True and unique_day("3", (("January","1"),("January","2")))==False and unique_month("March", (("January","1"),("February","1")))==False and unique_day("1", (("January","1"),("January","2")))==True and unique_day("16", tuple_of_possible_birthdays)==False and unique_day("17", tuple_of_possible_birthdays)==False and unique_day("18", tuple_of_possible_birthdays)==True and unique_day("19", tuple_of_possible_birthdays)==True and unique_month("May", tuple_of_possible_birthdays)==False and unique_month("June", tuple_of_possible_birthdays)==False and contains_unique_day("June", tuple_of_possible_birthdays)==True and contains_unique_day("July", tuple_of_possible_birthdays)==False

Task: Unique dates and months

Implement unique_day, unique_month and contains_unique_day.


def count_dates(date, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[1] == date:
            count += 1
    return count

def unique_day(date, possible_birthdays):
    if count_dates(date, possible_birthdays) == 1:
        return True
    else:
        return False

def count_months(month, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[0] == month:
            count += 1
    return count

def unique_month(month, possible_birthdays):
    if count_months(month, possible_birthdays) == 1:
        return True
    else:
        return False

def days(month, possible_birthdays):
    days_in_month = ()
    for i in possible_birthdays:
        if i[0] == month:
            days_in_month += (i[1],)
    return days_in_month

def contains_unique_day(month, possible_birthdays):
    for x in len(days(month, possible_birthdays)):
        if unique_day(days(month, possible_birthday)[x], possible_birthdays):
            return True
        else:
            return False


def count_dates(date, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[1] == date:
            count += 1
    return count

def unique_day(date, possible_birthdays):
    if count_dates(date, possible_birthdays) == 1:
        return True
    else:
        return False

def count_months(month, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[0] == month:
            count += 1
    return count

def unique_month(month, possible_birthdays):
    if count_months(month, possible_birthdays) == 1:
        return True
    else:
        return False

def days(month, possible_birthdays):
    days_in_month = ()
    for i in possible_birthdays:
        if i[0] == month:
            days_in_month += (i[1],)
    return days_in_month

def contains_unique_day(month, possible_birthdays):
    for x in len(days(month, possible_birthdays)):
        if unique_day(days(month, possible_birthdays)[x], possible_birthdays):
            return True
        else:
            return False


def count_dates(date, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[1] == date:
            count += 1
    return count

def unique_day(date, possible_birthdays):
    if count_dates(date, possible_birthdays) == 1:
        return True
    else:
        return False

def count_months(month, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[0] == month:
            count += 1
    return count

def unique_month(month, possible_birthdays):
    if count_months(month, possible_birthdays) == 1:
        return True
    else:
        return False

def days(month, possible_birthdays):
    days_in_month = ()
    for i in possible_birthdays:
        if i[0] == month:
            days_in_month += (i[1],)
    return days_in_month

def contains_unique_day(month, possible_birthdays):
    for x in days(month, possible_birthdays):
        if unique_day(days(month, possible_birthdays)[x], possible_birthdays):
            return True
        else:
            return False


def count_dates(date, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[1] == date:
            count += 1
    return count

def unique_day(date, possible_birthdays):
    if count_dates(date, possible_birthdays) == 1:
        return True
    else:
        return False

def count_months(month, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[0] == month:
            count += 1
    return count

def unique_month(month, possible_birthdays):
    if count_months(month, possible_birthdays) == 1:
        return True
    else:
        return False

def days(month, possible_birthdays):
    days_in_month = ()
    for i in possible_birthdays:
        if i[0] == month:
            days_in_month += (i[1],)
    return days_in_month

def contains_unique_day(month, possible_birthdays):
    for x in range(len(days(month, possible_birthdays))):
        if unique_day(days(month, possible_birthdays)[x], possible_birthdays):
            return True
        else:
            return False


def count_dates(date, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[1] == date:
            count += 1
    return count

def unique_day(date, possible_birthdays):
    if count_dates(date, possible_birthdays) == 1:
        return True
    else:
        return False

def count_months(month, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[0] == month:
            count += 1
    return count

def unique_month(month, possible_birthdays):
    if count_months(month, possible_birthdays) == 1:
        return True
    else:
        return False

def days(month, possible_birthdays):
    days_in_month = ()
    for i in possible_birthdays:
        if i[0] == month:
            days_in_month += (i[1],)
    return days_in_month

def contains_unique_day(month, possible_birthdays):
    days_in_month = ()
    for i in possible_birthdays:
        if i[0] == month:
            days_in_month += (i[1],)
    for x in range(len(days(month, possible_birthdays))):
        if unique_day(days(month, possible_birthdays)[x], possible_birthdays):
            return True
        else:
            return False


def count_dates(date, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[1] == date:
            count += 1
    return count

def unique_day(date, possible_birthdays):
    if count_dates(date, possible_birthdays) == 1:
        return True
    else:
        return False

def count_months(month, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[0] == month:
            count += 1
    return count

def unique_month(month, possible_birthdays):
    if count_months(month, possible_birthdays) == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):
    days_in_month = ()
    for i in possible_birthdays:
        if i[0] == month:
            days_in_month += (i[1],)
    for x in days(month, possible_birthdays):
        if unique_day(x, possible_birthdays):
            return True
        else:
            return False


def count_dates(date, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[1] == date:
            count += 1
    return count

def unique_day(date, possible_birthdays):
    if count_dates(date, possible_birthdays) == 1:
        return True
    else:
        return False

def count_months(month, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[0] == month:
            count += 1
    return count

def unique_month(month, possible_birthdays):
    if count_months(month, possible_birthdays) == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):
    days_in_month = ()
    for i in possible_birthdays:
        if i[0] == month:
            days_in_month += (i[1],)
    for i in days(month, possible_birthdays):
        if unique_day(i, possible_birthdays):
            return True
        else:
            return False


def count_dates(date, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[1] == date:
            count += 1
    return count

def unique_day(date, possible_birthdays):
    if count_dates(date, possible_birthdays) == 1:
        return True
    else:
        return False

def count_months(month, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[0] == month:
            count += 1
    return count

def unique_month(month, possible_birthdays):
    if count_months(month, possible_birthdays) == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):
    days_in_month = ()
    for i in possible_birthdays:
        if i[0] == month:
            days_in_month += (i[1],)
    for i in range(len(days(month, possible_birthdays))):
        if unique_day(i, possible_birthdays):
            return True
        else:
            return False


def count_dates(date, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[1] == date:
            count += 1
    return count

def unique_day(date, possible_birthdays):
    if count_dates(date, possible_birthdays) == 1:
        return True
    else:
        return False

def count_months(month, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[0] == month:
            count += 1
    return count

def unique_month(month, possible_birthdays):
    if count_months(month, possible_birthdays) == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):
    days_in_month = ()
    for i in possible_birthdays:
        if i[0] == month:
            days_in_month += (i[1],)
    for i in range(len(days(month, possible_birthdays))):
        if unique_day(days(month, possible_birthdays)[i], possible_birthdays):
            return True
        else:
            return False


def unique_day(day, possible_birthdays):
    counter = 0
    for i in possible_birthdays:
        if i[1] == day:
            if counter >= 1:
                return False
            else:
                counter += 1
    return True

def unique_month(month, possible_birthdays):
    counter = 0
    for i in possible_birthdays:
        if i[0] == month:
            if counter >= 1:
                return False
            else:
                counter += 1
    return True

def contains_unique_day(month, possible_birthdays):
    filtered = tuple(filter(lambda x: x[0] == month, possible_birthdays))
    tup1 = tuple(filter(lambda x: x[0] != month, possible_birthdays)) # Remaining dates
    tup2 = tuple(map(lambda x: x[1], tup1)) # Day of the remaining dates
    def unique(tup):
        output = ()
        for i in tup:
            if i not in output:
                output += (i,)
        return output
    dates = unique(tup2)

    for i in filtered:
        if i[1] not in dates:
            return True
    return False


def count_dates(date, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[1] == date:
            count += 1
    return count

def unique_day(date, possible_birthdays):
    if count_dates(date, possible_birthdays) == 1:
        return True
    else:
        return False

def count_months(month, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[0] == month:
            count += 1
    return count

def unique_month(month, possible_birthdays):
    if count_months(month, possible_birthdays) == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):
    days_in_month = ()
    for i in possible_birthdays:
        if i[0] == month:
            days_in_month += (i[1],)
    for i in range(len(days_in_month)):
        if unique_day(days_in_month[i], possible_birthdays):
            return True
        else:
            return False


def count_dates(date, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[1] == date:
            count += 1
    return count

def unique_day(date, possible_birthdays):
    if count_dates(date, possible_birthdays) == 1:
        return True
    else:
        return False

def count_months(month, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[0] == month:
            count += 1
    return count

def unique_month(month, possible_birthdays):
    if count_months(month, possible_birthdays) == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):
    days_in_month = ()
    for i in possible_birthdays:
        if i[0] == month:
            days_in_month += (i[1],)
    for x in range(len(days_in_month)):
        if unique_day(days_in_month[x], possible_birthdays):
            return True
        else:
            return False


def count_dates(date, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[1] == date:
            count += 1
    return count

def unique_day(date, possible_birthdays):
    if count_dates(date, possible_birthdays) == 1:
        return True
    else:
        return False

def count_months(month, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[0] == month:
            count += 1
    return count

def unique_month(month, possible_birthdays):
    if count_months(month, possible_birthdays) == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):
    days_in_month = ()
    for i in possible_birthdays:
        if i[0] == month:
            days_in_month += (i,)
    for x in range(len(days_in_month)):
        if unique_day(days_in_month[x][1], possible_birthdays):
            return True
        else:
            return False


def count_dates(date, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[1] == date:
            count += 1
    return count

def unique_day(date, possible_birthdays):
    if count_dates(date, possible_birthdays) == 1:
        return True
    else:
        return False

def count_months(month, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[0] == month:
            count += 1
    return count

def unique_month(month, possible_birthdays):
    if count_months(month, possible_birthdays) == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):
    days_in_month = ()
    for i in possible_birthdays:
        if i[0] == month:
            days_in_month += (i,)
    for x in range(len(days_in_month)):
        if unique_day(days_in_month[x][1], possible_birthdays) == True:
            return True
        else:
            return False


def count_dates(date, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[1] == date:
            count += 1
    return count

def unique_day(date, possible_birthdays):
    if count_dates(date, possible_birthdays) == 1:
        return True
    else:
        return False

def count_months(month, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[0] == month:
            count += 1
    return count

def unique_month(month, possible_birthdays):
    if count_months(month, possible_birthdays) == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):
    days_in_month = ()
    for i in possible_birthdays:
        if i[0] == month:
            days_in_month += (i,)
    for x in range(len(days_in_month)):
        if unique_day(days_in_month[x][1], possible_birthdays) == False:
            return True
        else:
            return False


def count_dates(date, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[1] == date:
            count += 1
    return count

def unique_day(date, possible_birthdays):
    if count_dates(date, possible_birthdays) == 1:
        return True
    else:
        return False

def count_months(month, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[0] == month:
            count += 1
    return count

def unique_month(month, possible_birthdays):
    if count_months(month, possible_birthdays) == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):
    days_in_month = ()
    for i in possible_birthdays:
        if i[0] == month:
            days_in_month += (i,)
    for x in range(len(days_in_month)):
        if unique_day(days_in_month[x][1], possible_birthdays) == False:
            return True
        else:
            return True


def count_dates(date, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[1] == date:
            count += 1
    return count

def unique_day(date, possible_birthdays):
    if count_dates(date, possible_birthdays) == 1:
        return True
    else:
        return False

def count_months(month, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[0] == month:
            count += 1
    return count

def unique_month(month, possible_birthdays):
    if count_months(month, possible_birthdays) == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):
    days_in_month = ()
    for i in possible_birthdays:
        if i[0] == month:
            days_in_month += (i,)
    for x in days_in_month:
        if unique_day(x[1], possible_birthdays) == False:
            return True
        else:
            return False


def count_dates(date, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[1] == date:
            count += 1
    return count

def unique_day(date, possible_birthdays):
    if count_dates(date, possible_birthdays) == 1:
        return True
    else:
        return False

def count_months(month, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[0] == month:
            count += 1
    return count

def unique_month(month, possible_birthdays):
    if count_months(month, possible_birthdays) == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):
    days_in_month = ()
    for i in possible_birthdays:
        if i[0] == month:
            days_in_month += (i,)
    for x in days_in_month:
        if unique_day(x[1], possible_birthdays):
            return True
        else:
            return False


def count_dates(date, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[1] == date:
            count += 1
    return count

def unique_day(date, possible_birthdays):
    if count_dates(date, possible_birthdays) == 1:
        return True
    else:
        return False

def count_months(month, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[0] == month:
            count += 1
    return count

def unique_month(month, possible_birthdays):
    if count_months(month, possible_birthdays) == 1:
        return True
    else:
        return False

def days(month, possible_birthdays):
    days_in_month = ()
    for i in range(len(possible_birthdays)):
        if possible_birthdays[i][0] == month:
            days_in_month += (possible_birthdays[i],)
    return days_in_month

def contains_unique_day(month, possible_birthdays):
    for x in range(len(days(month, possible_birthdays))):
        if unique_day(days(month, possible_birthdays)[x][1], possible_birthdays):
            return True
        else:
            return False


def map(fn, seq):
    res = ()

    for ele in seq:
        res = res + (fn(ele), )
    return res

def filter(pred, seq):
    res = ()

    for ele in seq:
        if pred(ele):
            res = res + (ele, )
    return res

def unique_day(day, possible_birthdays):
    a = map(lambda x : x[1], possible_birthdays)
    for i in  a:
        if i == day:
            b = filter(lambda x: x == i, a)
            if len(b) > 1:
                return False
            else:
                return True

def unique_month(month, possible_birthdays):
    a = map(lambda x : x[0], possible_birthdays)
    for i in  a:
        if i == month:
            b = filter(lambda x: x == i, a)
            if len(b) > 1:
                return False
            else:
                return True

def contains_unique_day(month, possible_birthdays):
    a = map(lambda x : x[0], possible_birthdays)
    b = map(lambda x : x[1], possible_birthdays)
    k = ()
    for i in range(len(a)):
        if month == a[i]:
                k += (b[i],)
    for f in range(len(k)):
        if len(filter(lambda x: x == k[f],b)) == 1:
            return True
    return False


def unique_day(day, possible_birthdays):
    flat_possible_birthdays=enumerate_tree(possible_birthdays)
    if flat_possible_birthdays.count(day) == 1:
        return True
    else:
        return False

def enumerate_tree(tree):
    if tree == ():
        return ()
    elif is_leaf(tree):
        return (tree,)
    else:
        return enumerate_tree(tree[0])+enumerate_tree(tree[1:])
def is_leaf(item):
    return type(item) != tuple

def unique_month(month, possible_birthdays):
    flat_possible_birthdays=enumerate_tree(possible_birthdays)
    if flat_possible_birthdays.count(month) == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):
    for each_day_in_month in filter(lambda x: x[0] == month, possible_birthdays):
        if unique_day(each_day_in_month[1], possible_birthdays) == True:
            res = True
        else:
            res = False
    return res

def filter(pred,seq):
    if seq ==():
        return ()
    elif pred(seq[0]):
        return (seq[0],)+filter(pred,seq[1:])
    else:
        return filter(pred,seq[1:])


def unique_day(date, possible_birthdays):
    if date in possible_birthdays[1]:
        return False
    else:
        return True

def unique_month(month, possible_birthdays):
    if month in possible_birthdays[0]:
        return False
    else:
        return True

def contains_unique_day(month, possible_birthdays):
    if x and y:
        return False
    else:
        return True


def unique_day(date, possible_birthdays):
    if date in possible_birthdays[1]:
        return False
    else:
        return True

def unique_month(month, possible_birthdays):
    if month in possible_birthdays[0]:
        return False
    else:
        return True

def contains_unique_day(month, possible_birthdays):
    if not unique_day and not unique_month:
        return False
    else:
        return True


def unique_day(date, possible_birthdays):
    if int(date) in possible_birthdays:
        return False
    else:
        return True

def unique_month(month, possible_birthdays):
    if month in possible_birthdays:
        return False
    else:
        return True

def contains_unique_day(month, possible_birthdays):
    if not unique_day and not unique_month:
        return False
    else:
        return True


def unique_day(date, possible_birthdays):
    if int(date) in possible_birthdays[1]:
        return False
    else:
        return True

def unique_month(month, possible_birthdays):
    if month in possible_birthdays[0]:
        return False
    else:
        return True

def contains_unique_day(month, possible_birthdays):
    if not unique_day and not unique_month:
        return False
    else:
        return True


def unique_day(date, possible_birthdays):
    if date in possible_birthdays[1:]:
        return False
    else:
        return True

def unique_month(month, possible_birthdays):
    if month in possible_birthdays[0]:
        return False
    else:
        return True

def contains_unique_day(month, possible_birthdays):
    if not unique_day and not unique_month:
        return False
    else:
        return True


def unique_day(date, possible_birthdays):
    if day in possible_birthdays:
        return True
    else:
        return False

def unique_month(month, possible_birthdays):
    return

def contains_unique_day(month, possible_birthdays):
    return


def unique_day(date, possible_birthdays):
    count=0
    for i in possible_birthdays:
        if i[0]==possile_birthdays[1]:
            count+=1
    if count==possible_birthdays[1]:
        return False
    else:
        return True

def unique_month(month, possible_birthdays):
    if month in possible_birthdays[0]:
        return False
    else:
        return True

def contains_unique_day(month, possible_birthdays):
    if not unique_day and not unique_month:
        return False
    else:
        return True


def unique_day(date, possible_birthdays):
    count=0
    for i in possible_birthdays:
        if i[1]==date:
            count+=1
    if count!=1:
        return False
    else:
        return True

def unique_month(month, possible_birthdays):
    if month in possible_birthdays[0]:
        return False
    else:
        return True

def contains_unique_day(month, possible_birthdays):
    if not unique_day and not unique_month:
        return False
    else:
        return True


def unique_day(date, possible_birthdays):
    count=0
    for i in possible_birthdays:
        if i[1]==date:
            count+=1
    if count==1:
        return True

def unique_month(month, possible_birthdays):
    if month in possible_birthdays[0]:
        return False
    else:
        return True

def contains_unique_day(month, possible_birthdays):
    if not unique_day and not unique_month:
        return False
    else:
        return True


def unique_day(day, possible_birthdays):
    def enumerate_tree(tree):
        def is_leaf(tree):
            return type(tree)!= tuple
        if tree == ():
            return ()
        elif is_leaf(tree):
            return (tree, )
        else:
            return enumerate_tree(tree[0]) + enumerate_tree(tree[1:])

    flat_tree = enumerate_tree(possible_birthdays)
    if flat_tree.count(day) > 1:
        return False

    return True

def unique_month(month, possible_birthdays):
    def enumerate_tree(tree):
        def is_leaf(tree):
            return type(tree)!= tuple
        if tree == ():
            return ()
        elif is_leaf(tree):
            return (tree, )
        else:
            return enumerate_tree(tree[0]) + enumerate_tree(tree[1:])

    flat_tree = enumerate_tree(possible_birthdays)

    if flat_tree.count(month) >1:
        return False
    return True

def contains_unique_day(month, possible_birthdays):
    tuppy = ()
    for x in possible_birthdays:
        if unique_day(x[1], possible_birthdays):
            tuppy += (x, )

    for y in tuppy:
        if y[0] == month:
            return True
    return False


def statement1(birthday, possible_birthdays):
    x = unique_month(birthday[0],possible_birthdays)
    y = contains_unique_day(birthday[0], possible_birthdays)

    if x == False and y == False:
        return True

    else:
        return False

def statement2(birthday, possible_birthdays):
    z = unique_day(birthday[1],possible_birthdays)

    if z == True:
        return True

    else:
        return False

def statement3(birthday, possible_birthdays):
    q = unique_month(birthday[0],possible_birthdays)

    if q == True:
        return True

    else:
        return False


def statement1(birthday, possible_birthdays):
    x = unique_month(birthday[0],possible_birthdays)
    y = contains_unique_day(birthday[0], possible_birthdays)

    if x == False and y == False:
        return True

    return False

def statement2(birthday, possible_birthdays):
    z = unique_day(birthday[1],possible_birthdays)

    if z == True:
        return True

    return False

def statement3(birthday, possible_birthdays):
    q = unique_month(birthday[0],possible_birthdays)

    if q == True:
        return True

    return False


def statement1(birthday, possible_birthdays):
    A = unique_month(birthday[0],possible_birthdays)
    B = contains_unique_day(birthday[0], possible_birthdays)

    if A == False and B == False:
        return True

    return False

def statement2(birthday, possible_birthdays):
    C = unique_day(birthday[1],possible_birthdays)

    if C == True:
        return True

    return False

def statement3(birthday, possible_birthdays):
    D = unique_month(birthday[0],possible_birthdays)

    if D == True:
        return True

    return False


def unique_day(day, possible_birthdays):
    count = 0
    for item in possible_birthdays:
        if day == item[1]:
            count +=1
        else:
            continue
    if count >=2:
        return False
    else:
        return True

def unique_month(month, possible_birthdays):
    count = 0
    for item in possible_birthdays:
        if month == item[0]:
            count +=1
        else:
            continue
    if count >=2:
        return False
    else:
        return True

def contains_unique_day(month, possible_birthdays):
    day = filter(lambda x: x[0]== month, possible_birthdays)
    for item in tuple(day):
        if unique_day(item[1],possible_birthdays) == True:
            return True
        else:
            continue
    return False


def unique_day(day, possible_birthdays):
    store = 0
    for i in possible_birthdays:
        if i[1] == day:
            if store == 1:
                return False
            else:
                store += 1
    return True

def unique_month(month, possible_birthdays):
    store = 0
    for i in possible_birthdays:
        if i[0] == month:
            if store == 1:
                return False
            else:
                store += 1
    return True

def contains_unique_day(month, possible_birthdays):
    def generate_unique_days(possible_birthdays):
        generate = ()
        for i in range(14, 20):
            if unique_day(str(i), possible_birthdays):
                generate += (str(i),)
        return generate
    for i in possible_birthdays:
        if i[0] == month:
            if str(i[1]) in generate_unique_days(possible_birthdays):
                return True
    return False


def remove_extras(lst):
    newlist = []
    for i in lst:
        if i not in newlist:
            newlist.append(i)
    return newlist

Task: Duplicate elimination

Write a function remove_extras(lst) that takes in a list and returns a new list with
all repeated occurrences of any element removed. For example, remove_extras([5,
2, 1, 2, 3]) returns the list [5, 2, 1, 3].


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if i not in new_lst:
            new_lst.append(i)
        else:
            continue
    return new_lst


def remove_extras(lst):
    output = []
    for i in lst:
        if i not in output:
            output.append(i)
    return output


def remove_extras(lst):
    new = []
    for i in lst:
        if i not in new:
            new += [i]
        else:
            continue
    return new


def remove_extras(lst):
    new=[]
    for i in lst:
        if i not in new:
            new.append(i)
    return new


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if i in new_lst:
            continue
        else:
            new_lst.append(i)
    return new_lst


def remove_extras(lst):
    keep = []
    for i in lst :
        if i not in keep :
            keep.append(i)
    return keep


def remove_extras(lst):
    new_lst = []
    for num in lst:
        if num not in new_lst:
            new_lst.append(num)
    return new_lst


def remove_extras(lst):
    # your code here
    occurrences = ()
    new_lst = []
    for item in lst:
        if item not in occurrences:
            occurrences += (item,)
            new_lst.append(item)
    return new_lst


def remove_extras(lst):
    length = len(lst)
    if length == 0:
        return []
    result = [lst[0]]
    for i in range(1,length):
        if lst[i] not in result:
            result = result + [lst[i]]
    return result


def remove_extras(lst):
    new = []
    for x in lst:
        if x not in new:
            new += [x,]
        else:
            new += []
    return new
    pass


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if i not in new_lst:
            new_lst += [i]
    return new_lst


def remove_extras(lst):
    lst.reverse()
    for i in lst:
        if lst.count(i) >1:
            j = 0
            while j < lst.count(i):
                lst.remove(i)
                j += 1
    lst.reverse()
    return lst


def remove_extras(lst):
    a=[]
    for i in lst:
        if i not in a:
            a+=[i]
    return a


def remove_extras(lst):
    output = []
    for i in lst:
        if i not in output:
            output += [i]
    return output


def remove_extras(lst):
    result = []
    for i in lst:
        if i not in result:
            result += [i]
    return result


def remove_extras(lst):
    return [lst[i] for i in range(len(lst)) if lst[i] not in lst[:i]]


def remove_extras(lst):
    new_lst = []
    for numbers in lst:
        if numbers not in new_lst:
            new_lst.append(numbers)
    return new_lst


def remove_extras(lst):
    new=[]
    for i in lst:
        new=new+[i] if i not in new else new
    return new


def remove_extras(lst):
    new_list=[]
    for value in lst:
       if value not in new_list:
          new_list.append(value)
    return new_list


def remove_extras(lst):
    new_lst=[]
    for i in lst:
        if i not in new_lst:
            new_lst.append(i)
    return new_lst


def remove_extras(lst):
    s = []
    for i in lst:
        if i not in s:
            s.append(i)
    return s


def remove_extras(lst):
    new = []
    for i in lst:
        if i not in new:
            new = new + [i,]
    return new
    pass


def remove_extras(lst):
    a=[]
    for i in lst:
        if i not in a:
            a.append(i)
    return a


def remove_extras(lst):
    result=[]
    for i in lst:
        if i not in result:
            result+=[i]
    return result


def remove_extras(lst):
    newlist = []
    for x in lst:
        if x not in newlist:
            newlist.append(x)
    return newlist


def remove_extras(lst):
    copy_list = lst.copy()
    copy_list.reverse()
    for i in lst:
        x = lst.count(i)
        if x > 1:
            for j in range(x-1):
                copy_list.remove(i)
            lst = copy_list
            lst.reverse()
    return lst


def remove_extras(lst):
    new_lst = []
    for ele in lst:
        if not (ele in new_lst):
            new_lst.insert(len(new_lst), ele)
    return new_lst


def remove_extras(lst):
    product = []
    for i in lst:
        if i not in product:
            product.append(i)
    return product


def remove_extras(lst):
    if lst == []:
        return lst
    else:
        one = [lst[0],]
        for repeat in lst:
            if repeat not in one:
                one += [repeat,]
        return one


def remove_extras(lst):
    remove_indices = []

    for i in range(len(lst)):
        this = lst[i]

        for j in range(i):
            if lst[j] == this:
                remove_indices.append(i)

    for i in remove_indices:
        lst[i] = None

    while None in lst:
        del lst[lst.index(None)]

    return lst


def remove_extras(lst):
    new=[]
    for i in lst:
        if not i in new:
            new+=[i]
    return new# your code here
    pass


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if i not in new_lst:
            new_lst.append(i)
    return new_lst


def remove_extras(lst):
    result = []
    for i in lst:
        if i not in result:
            result += [i]
    return result


def remove_extras(lst):
    res = []
    for i in lst:
        if i not in res:
            res.append(i)
    return res


def remove_extras(lst):
    output = []
    for x in lst:
        if x not in output:
            output.append(x)
    return output


def remove_extras(lst):
    new = []
    for el in lst:
        if el not in new:
            new += [el,]
    return new


def remove_extras(lst):
    result = []
    for elem in lst:
        if elem not in result:
            result.append(elem)
    return result


def remove_extras(lst):
    lst.reverse()
    for i in lst:
        if lst.count(i) >1:
            j = 0
            while j < lst.count(i):
                lst.remove(i)
                j += 1
    lst.reverse()
    return lst


def remove_extras(lst):
    l=[]
    for i in lst:
        checker=True
        for k in l:
            if k==i:
                checker=False
        if checker:
            l+=[i]
    return l


def remove_extras(lst):
    i = 0
    while i < len(lst):
        j = i + 1
        while j < len(lst):
            if lst[i] == lst[j]:
                lst = lst[:j] + lst[j+1:]
            else:
                j += 1
        i += 1
    return lst


def remove_extras(lst):
    lsts = []
    for i in lst:
       if i not in lsts:
          lsts.append(i)
    lst = lsts
    return lst


def remove_extras(lst):
    s = []
    for element in lst:
        if element not in s:
            s.append(element)
    return s


def remove_extras(lst):
    #your code here
    result = []
    for entry in lst:
        if entry not in result:
            result = result + [entry]
    return result


def remove_extras(lst):
    new_lst = []
    for element in lst:
        if element not in new_lst:
            new_lst.append(element)
    return new_lst


def remove_extras(lst):
    list1 = []
    for i in lst:
        if i not in list1:
            list1 += [i,]
    return list1


def remove_extras(lst):
    for i in lst:
        remove_multiple(i, lst)
    return lst

def remove_multiple(n, lst):
    if lst.count(n) == 1:
        return lst
    else:
        lst.reverse()
        lst.remove(n)
        lst.reverse()
        return remove_multiple(n, lst)


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if i in new_lst:
            continue
        else:
             new_lst += [i,]
    return new_lst


def remove_extras(lst):
    tmp = []
    for x in lst:
        if x not in tmp:
            tmp.append(x)
    return tmp


def remove_extras(lst):
    list = []
    for i in lst:
        if i not in list:
            list.append(i)
    return list


def remove_extras(lst):
    store = []
    for ele in lst:
        if ele not in store:
            store += [ele]
    return store


def remove_extras(lst):
    x = tuple(lst)
    store = ()
    for ele in lst:
        if ele not in store:
            store += (ele,)
    return list(store)


def remove_extras(lst):
    sumx=[]
    for i in lst:
        if i not in sumx:
            sumx.append(i)
    return sumx


def remove_extras(lst):
    new_list=[]
    for ele in lst:
        if ele not in new_list:
            new_list.append(ele)
    return new_list


def remove_extras(lst):
    new = []
    for i in lst:
        if i not in new:
            new = new + [i,]
    return new
    pass


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if i not in new_lst:
            new_lst += [i]
    return new_lst


def remove_extras(lst):
    a = ()
    c = ()
    n = len(lst)
    for i in range(n):
        for j in range(i,n):
            if lst[i] == lst[j] and i != j:
                a += (j,) #j is the jth index of the list
            else:
                continue
    d = tuple(set(a)) #[repeated_index1, repeated_index2]
    for i in d:
        c += (lst[i],)
    lst.reverse()
    for j in range(len(c)):
        lst.remove(c[j])
    lst.reverse()
    return lst


def remove_extras(lst):
    result=[]
    for i in lst:
        if i not in result:
            result+=[i]
    return result


def remove_extras(lst):
    answer = []
    for i in lst:
        unique = True
        for a in answer:
            if i == a:
                unique = False
                break
        if unique:
            answer += [i]
    return answer


def remove_extras(lst):
    lst_final = []
    for i in lst:
        if i not in lst_final:
            lst_final.append(i)
    return lst_final


def remove_extras(lst):
    res = []
    for i in lst:
        if i not in res:
            res.append(i)
    return res


def remove_extras(lst):
    new = []
    if lst == []:
        return lst
    else:
        for i in lst:
            if i in new:
                continue
            else:
                new.append(i)
    return new


def remove_extras(lst):
    # your code here
    new_lst = []
    for i in lst:
        if not i in new_lst:
            new_lst.append(i)
    return new_lst


def remove_extras(lst):
    new_lst = []
    for ele in lst:
        if not (ele in new_lst):
            new_lst.insert(len(new_lst), ele)
    return new_lst


def remove_extras(lst):
    new=[]
    for i in lst:
        new=new+[i] if i not in new else new
    return new


def remove_extras(lst):
    final=[]
    for x in lst:
        if x not in final:
            final.append(x)
    return final
    pass


def remove_extras(lst):

    new = []

    for i in lst:
        if i not in new:
            new = new + [i]
    return new


def remove_extras(lst):
    newlist = []
    for i in lst:
        if i not in newlist:
            newlist.append(i)
    return newlist


def remove_extras(lst):
    remove_lst = []
    for i in lst:
        if i not in remove_lst:
            remove_lst.append(i)
    return remove_lst


def remove_extras(lst):
    output = []
    for entry in lst:
        if output.count(entry) == 0:
            output == output.append(entry)
    return output


def remove_extras(lst):
    new_lst=[]
    for element in lst:
        if element not in new_lst:
            new_lst += [element]
    return new_lst


def remove_extras(lst):
    l=[]
    for x in lst:
        if x not in l:
            l.append(x)
    return l


def remove_extras(lst):
    newlst=[]
    for i in lst:
        while i not in newlst:
            newlst.append(i)
    return newlst


def remove_extras(lst):
    s=[]
    for i in lst:
        if i not in s:
            s.append(i)
    return s
    pass


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if i not in new_lst:
            new_lst.append(i)
    return new_lst


def remove_extras(lst):
    new_lst = []
    for i in range(len(lst)):
        if lst[0] in new_lst:
            new_lst = new_lst
            lst = lst[1:]
        else:
            new_lst.append(lst[0])
            lst = lst[1:]
    return new_lst


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if i not in new_lst:
            new_lst += [i,]
    return new_lst


def remove_extras(lst):
    newlist = []
    for number in lst:
       if number not in newlist:
           newlist.append(number)
    return newlist

    # your code here
    pass


def remove_extras(lst):
    a = []
    for i in lst:
        if i not in a:
            a += [i]
    return a


def remove_extras(lst):
    if lst == []:
        return lst
    new_lst = [lst[0],]
    for e in lst:
        if e in new_lst:
            continue
        else:
            new_lst.append(e)

    return new_lst


def remove_extras(lst):
    new_lst = []
    for item in lst:
        if item not in new_lst:
            new_lst.append(item)
    return new_lst


def remove_extras(lst):
    o = []
    for i in lst:
        if i not in o:
            o.append(i)
    return o


def remove_extras(lst):
    new_lst = []
    for ele in lst:
        if ele not in new_lst:
            new_lst.append(ele)
    return new_lst


def remove_extras(lst):
    non_extra = ()
    count = 0
    for el in lst:
        if el not in non_extra:
            non_extra += (el,)
        else:
           continue
    lst = list(non_extra)
    return lst


def remove_extras(values):
    output = []
    for value in values:
        if value not in output:
            output.append(value)
    return output


def remove_extras(lst):
    result = []
    for i in lst:
        if i not in result:
            result.append(i)
    return result


def remove_extras(lst):
    new = []
    for i in lst:
        if i not in new:
            new += [i]
        else:
            continue
    return new


def remove_extras(lst):
    l = []
    for i in lst:
        if i not in l:
            l += [i]
    return l


def remove_extras(lst):
    lst2=[]
    for x in lst:
        if x not in lst2:
            lst2+=[x]
    return lst2


def remove_extras(lst):
    l=[]
    for i in lst:
        checker=True
        for k in l:
            if k==i:
                checker=False
        if checker:
            l+=[i]
    return l


def remove_extras(lst):
    s =[]
    for i in lst:
       if i not in s:
          s.append(i)
    return s


def remove_extras(lst):
    new = []
    for x in lst:
        if x not in new:
            new += [x,]
        else:
            new += []
    return new
    pass


def remove_extras(lst):
    newlst=[]
    for i in lst:
        if i not in newlst:
            newlst+= [i,]
    return newlst


def remove_extras(lst):
    output = []
    for x in lst:
        if x not in output:
            output.append(x)
    return output


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if i in new_lst:
            new_lst = new_lst
        else:
            new_lst += [i]
    return new_lst


def remove_extras(lst):
    output = []
    seen = set()
    for value in lst:
        # If value has not been encountered yet,
        # ... add it to both list and set.
        if value not in seen:
            output.append(value)
            seen.add(value)
    return output
    pass


def remove_extras(lst):
    lst1 = []
    for i in lst:
        if i not in lst1:
            lst1 += [i,]
    return lst1


def remove_extras(lst):
    result = []
    for i in lst:
        if i not in result:
            result += [i]
    return result


def remove_extras(lst):
    if lst == []:
        return []
    else:
        a =[lst[0]]
        i = lst[0]
        for j in range (1,len(lst)): #while lst is not empty
            if i == lst[j]:
                continue
            else:
                a += [lst[j]]

        return a


def remove_extras(lst):
	new_lst = []
	for i in lst:
		if i not in new_lst:
			new_lst.append(i)
	return new_lst


def remove_extras(lst):
    lst.reverse()
    for i in lst:
        if lst.count(i) > 1:
            lst.remove(i)
    lst.reverse()
    return lst


def remove_extras(lst):
    store = []
    for ele in lst:
        if ele not in store:
            store += [ele]
    return store


def remove_extras(lst):
	newlst = []
	for i in lst:
		if i not in newlst:
			newlst.append(i)
	return newlst


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if i not in new_lst:
            new_lst = new_lst + [i,]
        else:
            continue
    return new_lst


def remove_extras(lst):
    new_lst=[]
    for i in lst:
        if i in new_lst:
            continue
        else:
            new_lst.append(i)
    return new_lst


def remove_extras(lst):
    s = []
    for n in lst:
        if n not in s:
           s.append(n)
    return s


def remove_extras(lst):
    new = []
    for term in lst:
        if term not in new:
            new += [term,]
    return new


def remove_extras(lst):
  output = []
  for i in lst:
    if i not in output:
      output.append(i)
  return output


def remove_extras(lst):
    new = []
    for num in lst:
        if num in new:
            continue
        new.append(num)
    return new


def remove_extras(lst):
    # your code here
    lst_new = []
    for element in lst:
        if element not in lst_new:
            lst_new.append(element)
    return lst_new


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if i not in new_lst:
            new_lst += [i]
    return new_lst

    pass


def remove_extras(lst):
    a = []
    for ele in lst:
        if ele in a:
            continue
        else:
            a = a+[ele]
    return a


def remove_extras(lst):
    wo_extras = []
    for i in lst:
        if i in wo_extras:
            continue
        wo_extras.append(i)
    return wo_extras
    pass


def remove_extras(lst):
    s =[]
    for i in lst:
       if i not in s:
          s.append(i)
    return s


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if i not in new_lst:
            new_lst += [i,]
    return new_lst


def remove_extras(lst):
    if lst==[]:
        return []
    new_lst=[lst[0]]
    for i in range(len(lst)):
        a=lst[i]
        for h in range(i,len(lst)):
            if a!=lst[h]:
                ele=lst[h]
                if ele in new_lst:
                    continue
                new_lst.append(ele)
    return new_lst


def remove_extras(lst):
    lst_final = []
    for i in lst:
        if i not in lst_final:
            lst_final.append(i)
    return lst_final


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if i not in new_lst:
            new_lst.append(i)
    return new_lst


def remove_extras(lst):
    result = []

    for element in lst:
        if element not in result:
            result.append(element)
    return result


def remove_extras(lst):
    o = []
    for i in lst:
        if i not in o:
            o.append(i)
    return o


def remove_extras(lst):
    new_list = []
    n = len(lst)
    for counter1 in range(n):
        if lst[counter1] not in new_list:
            new_list.append(lst[counter1])
    return new_list


def remove_extras(lst):
    lst2 = []
    for i in lst:
        if i not in lst2:
            lst2.append(i)
    return lst2


def remove_extras(lst):
    # your code here
    if lst == []:
        return []
    else:
        result = (lst[0],)
        for item in lst[1:]:
            if item in result:
                continue
            else:
                result +=(item,)
        return list(result)


def remove_extras(lst):
    copy = lst.copy()
    for i in copy:
        if copy.count(i) > 1:
            left = copy[:copy.index(i)+1]
            right = copy[copy.index(i)+1:]
            right.remove(i)
            copy = left + right
    return copy


def remove_extras(lst):
    newlst = []
    for element in lst:
        if element not in newlst:
            newlst = newlst + [element]
    return newlst


def remove_extras(lst):
    lst.reverse()
    for element in lst:
        if lst.count(element)>1:
            lst.remove(element)
    lst.reverse()
    return lst


def remove_extras(lst):
    if lst == []:
        return lst
    new_lst = [lst[0],]
    for e in lst:
        if e in new_lst:
            continue
        else:
            new_lst.append(e)

    return new_lst


def remove_extras(lst):
    result = []
    for i in lst:
        if i not in result:
            result = result + [i,]
        else:
            continue
    return result


def remove_extras(lst):
    store = []
    for ele in lst:
        if ele not in store:
            store += [ele]
    return store


def remove_extras(lst):
    new = []
    for i in lst:
        if i not in new:
            new += [i]
    return new


def remove_extras(lst):
    result = []
    for i in lst:
        if i not in result:
            result.append(i)
    return result


def remove_extras(lst):
    result=[]
    for i in lst:
        if i not in result:
            result.append(i)
        else:
            continue
    return result


def remove_extras(lst):
    result = []
    for i in lst:
        if i not in result:
            result += [i]
    return result


def remove_extras(lst):
    remove_lst = []
    for i in lst:
        if i not in remove_lst:
            remove_lst.append(i)
    return remove_lst


def remove_extras(lst):
    res= []
    for i in lst:
        if res.count(i) == 0:
            res = res + [i]
        else:
            res = res
    return res


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if i in new_lst:
            continue
        else:
            new_lst.append(i)
    return new_lst


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if i not in new_lst:
            new_lst += [i]
    return new_lst

    pass


def remove_extras(lst):
    newlst=[]
    for i in lst:
        if i not in newlst:
            newlst.append(i)
    return newlst

    # your code here
    pass


def remove_extras(lst):
    lst2 = []
    for i in lst:
        if i not in lst2:
            lst2.append(i)
    return lst2


def remove_extras(list):
    list.reverse()
    for element in list:
        if list.count(element)>1:
            list.remove(element)
    list.reverse()
    return list


def remove_extras(lst):
    newlst=[]
    for i in lst:
        if i not in newlst:
            newlst+= [i,]
    return newlst


def remove_extras(lst):
    if lst == []:
        return []
    sub_list = []
    for elem in lst:
        if elem not in lst[lst.index(elem)+1:]:
            return lst
        elif elem in lst[lst.index(elem)+1:]:
            sub_list += lst[lst.index(elem)+1:]
            while elem in sub_list:
                sub_list.remove(elem)
            return lst[:lst.index(elem)+1] + sub_list


def remove_extras(lst):
    # your code here
    result = []
    for i in lst:
        if i not in result:
            result.append(i)
    return result


def remove_extras(lst):
    new_lst = []
    for x in lst:
        if x not in new_lst:
            new_lst += [x]
    return new_lst


def remove_extras(lst):
    newlst = []
    for element in lst:
        if element not in newlst:
            newlst = newlst + [element]
    return newlst


def remove_extras(lst):
    if lst==[]:
        return []
    new_lst = [lst[0]]
    for i in range(0,len(lst)):
        a=lst[i]
        for h in range(i,len(lst)):
            if a!=lst[h]:
                ele=lst[h]
                new_lst.append(ele)
        return new_lst
    return new_lst


def remove_extras(lst):
    new_lst=[]
    for i in lst:
        if i in new_lst:
            continue
        else:
            new_lst.append(i)
    return new_lst


def remove_extras(lst):
    lst1=[]
    for i in lst:
        if i not in lst1:
            lst1.append(i)
    return lst1


def remove_extras(lst):

    seq = []

    for i in lst:
        if i in seq:
            continue
        else:
            seq += [i]

    return seq


def remove_extras(lst):
    list = []
    for i in lst:
        if i not in list:
            list += [i]
    return list


def remove_extras(lst):
    i=1
    if lst==[]: return lst

    while i!=len(lst):
        if lst[i] in lst[:i]:
            del lst[i]
            continue
        i+=1
    return lst


def remove_extras(lst):
    result=[]
    for i in lst:
        if i in result:
            continue
        result+= [i]
    return result


def remove_extras(lst):
    newlist = []
    for i in lst:
        if i not in newlist:
            newlist = newlist + [i,]
    return newlist


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if i not in new_lst:
            new_lst.append(i)
    return new_lst


def remove_extras(lst):
    result = []
    for i in lst:
        if i not in result:
            result = result + [i,]
        else:
            continue
    return result


def remove_extras(lst):
    new = []
    for i in lst:
        if i not in new: #if its already in new, it would skip the element and wont add into the new listt.
            new += [i, ]
        else:
            continue
    return new


def remove_extras(lst):
    lst2=[]
    for x in lst:
        if x not in lst2:
            lst2+=[x]
    return lst2


def remove_extras(lst):
    result = []
    for i in lst:
        if i not in result:
            result = result + [i]
    return result

    # your code here
    pass


def remove_extras(lst):
    new_lst = []
    for numbers in lst:
        if numbers not in new_lst:
            new_lst.append(numbers)
    return new_lst


def remove_extras(lst):
    new = []
    for term in lst:
        if term not in new:
            new += [term,]
    return new


def remove_extras(lst):
    for i in lst:
        if lst.count(i) > 1:
            left = lst[:lst.index(i)+1]
            right = lst[lst.index(i)+1:]
            right.remove(i)
            lst = left + right
    return lst


def remove_extras(lst):
    a = ()
    c = ()
    n = len(lst)
    for i in range(n):
        for j in range(i,n):
            if lst[i] == lst[j] and i != j:
                a += (j,) #j is the jth index of the list
            else:
                continue
    d = tuple(set(a)) #[repeated_index1, repeated_index2]
    for i in d:
        c += (lst[i],)
    b = lst[::-1]
    for j in range(len(c)):
        b.remove(c[j])
    e = b[::-1]
    return e


def remove_extras(lst):
    a = ()
    c = ()
    n = len(lst)
    for i in range(n):
        for j in range(i,n):
            if lst[i] == lst[j] and i != j:
                a += (j,) #j is the jth index of the list
            else:
                continue
    d = tuple(set(a)) #[repeated_index1, repeated_index2]
    for i in d:
        c += (lst[i],)
    lst.reverse()
    for j in range(len(c)):
        lst.remove(c[j])
    lst.reverse()
    return lst


def remove_extras(lst):
    a = []
    for i in lst:
        if i not in a:
            a.append(i)
    return a


def remove_extras(lst):
    result = []
    for item in lst:
        if item not in result:
            result += [item]
    return result


def remove_extras(lst):
    result = []
    for item in lst:
        if item not in result:
            result += [item,]
    return result


def remove_extras(lst):
    # your code here
    new_lst = []
    for i in lst:
        if not i in new_lst:
            new_lst.append(i)
    return new_lst


def remove_extras(lst):
	final=[]
	for i in lst:
		if i not in final:
			final+=[i,]
		else:
			continue
	return final


def remove_extras(lst):
    if lst == []:
        return []
    sub_list = []
    for elem in lst:
        if elem not in lst[lst.index(elem)+1:]:
            return lst
        elif elem in lst[lst.index(elem)+1:]:
            sub_list += lst[lst.index(elem)+1:]
            while elem in sub_list:
                sub_list.remove(elem)
            return lst[:lst.index(elem)+1] + sub_list


def remove_extras(lst):
    output = []
    for i in lst:
        if i not in output:
            output.append(i)
    return output


def remove_extras(lst):
    list = []
    for i in lst:
        if i not in list:
            list.append(i)
    return list


def remove_extras(lst):

    seq = []

    for i in lst:
        if i in seq:
            continue
        else:
            seq += [i]

    return seq


def remove_extras(lst):
    result=[]
    for i in lst:
        if i in result:
            continue
        result+= [i]
    return result


def remove_extras(values):
    output = []
    seen = set()
    for value in values:
        if value not in seen:
            output.append(value)
            seen.add(value)
    return output


def remove_extras(values):
    output = []
    seen = ()
    for value in values:
        if value not in seen:
            output.append(value)
            seen += (value,)
    return output


def remove_extras(values):
    output = []
    for value in values:
        if value not in output:
            output.append(value)
    return output


def remove_extras(lst):
    new = []
    for i in lst:
        if i not in new:
            new += [i, ]
        else:
            continue
    return new


def remove_extras(lst):
    result = []
    for i in lst:
        if i not in result:
            result = result + [i]
    return result

    # your code here
    pass


def remove_extras(lst):
    copy = lst.copy()
    for i in copy:
        if copy.count(i) > 1:
            left = copy[:copy.index(i)+1]
            right = copy[copy.index(i)+1:]
            right.remove(i)
            copy = left + right
    return copy


def remove_extras(lst):
	new_lst = []
	for i in lst:
		if i not in new_lst:
			new_lst.append(i)
	return new_lst


def remove_extras(lst):
    new_lst = []
    for i in range (len(lst)):
        if lst[i] not in new_lst:
            new_lst.append(lst[i])
    return new_lst
print(remove_extras([1,5,1,1,3,2]))


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if i not in new_lst:
            new_lst.append(i)
    return new_lst


def remove_extras(lst):
    result=[]
    for i in lst:
        if i in result:
            continue
        else:
            result+=[i,]
    return result
    pass


def remove_extras(lst):
    s = []
    for element in lst:
        if element not in s:
            s.append(element)
    return s


def remove_extras(lst):
    result = []
    check = set()
    for element in lst:
        if element not in check:
            result.append(element)
            check.add(element)
    return result


def remove_extras(lst):
    lst2 = []
    for i in lst:
        if i not in lst2:
            lst2.append(i)
    return lst2


def remove_extras(lst):
    a = []
    for i in lst:
        if i not in a:
            a.append(i)
    return a


def remove_extras(lst):
    new_list = []
    for k in range(len(lst)):
        if lst[k] in lst[:k]:
            new_list = new_list
        else:
            new_list = new_list + [lst[k]]
    return new_list


def remove_extras(lst):
    # your code here
    z=[]
    for i in lst:
        if i in z:
            continue
        else:
            z.append(i)
    return z


def remove_extras(lst):
    if len(lst)==0:
        return lst
    l=[lst[0],]
    for i in lst[1:]:
        if i not in l:
            l+=[i,]
    return l

#qn3
#list1 = [1] * 4
#list2 = [5, 5, 5]
#while not 0:
#    list1[0] += 1
#    if list1[0] == 5:
#         break          #break out of the while loop
#         list1[1] += 2
#    list1[2] += 3       #list1[2]+=3 every time it loops

#list1=[5, 1, 10, 1]
#list2 is [5, 5, 5]


def remove_extras(lst):
    new_lst = []
    for num in lst:
        if num not in new_lst:
            new_lst.append(num)
    return new_lst


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if not i in new_lst:
            new_lst.append(i)
    return new_lst


def remove_extras(lst):
	new = []
	for i in lst:
	    if i not in new:
	      new.append(i)
	return new


def remove_extras(lst):
    # your code here
    lst.reverse()
    for item in lst:
        while lst.count(item) != 1:
            lst.remove(item)
    lst.reverse()
    return lst


def remove_extras(lst):
    s =[]
    for i in lst:
        if i not in s:
            s = s +[i]
    lst.clear()
    lst.extend(s)
    return lst


def remove_extras(lst):
    x = []
    for i in lst:
        if i not in x:
            x = x + [i,]
        else:
            continue
    return x


def remove_extras(lst):
    s = []
    for i in lst:
        if i not in s:
            s.append(i)
    return s


def remove_extras(lst):
    new_list=[]
    for value in lst:
       if value not in new_list:
          new_list.append(value)
    return new_list


def remove_extras(lst):
	result = []
	for i in lst:
		if i not in result:
			result.append(i)
	return result


def remove_extras(lst):
    new = []
    for i in lst:
        if i not in new:
            new.append(i)
    return new


def remove_extras(lst):
    store = []
    for ele in lst:
        if ele not in store:
            store += [ele]
    return store


def remove_extras(lst):
  output = []
  for i in lst:
    if i not in output:
      output.append(i)
  return output


def remove_extras(lst):
    removed = []
    for e in lst:
       if (e in lst) and (e not in removed):
          removed.append(e)
    return removed


def remove_extras(lst):
    newlist = []
    for i in lst:
        if i in newlist:
            continue
        else:
            newlist += [i]
    return newlist


def remove_extras(lst):
    # your code here
    if lst == []:
        return []
    else:
        result = (lst[0],)
        for item in lst[1:]:
            if item in result:
                continue
            else:
                result +=(item,)
        return list(result)


def remove_extras(lst):
    new_list = []
    for k in range(len(lst)):
        if lst[k] in lst[:k]:
            new_list = new_list
        else:
            new_list = new_list + [lst[k]]
    return new_list


def remove_extras(n):
    result = []
    counter = 0
    while counter < len(n):
        temp = n[counter]
        if temp not in result:
            result.append(temp)
        counter = counter + 1
    return result


def remove_extras(lst):
    newlist = []
    for i in lst:
      if i not in newlist:
        newlist.append(i)
    return newlist


def remove_extras(lst):
    new = []
    for e in lst:
        if e not in new:
            new.append(e)
    return new


def remove_extras(lst):
    result = []
    for i in lst:
        if i not in result:
            result.append(i)
    return result
    pass


def remove_extras(lst):
    new_lst=[]
    for i in lst:
        if i not in new_lst:
            new_lst.append(i)
    return new_lst


def remove_extras(lst):
    final=[]
    for x in lst:
        if x not in final:
            final.append(x)
    return final
    pass


def remove_extras(lst):
    new=[]
    while lst!=[]:
        new=new+[lst[0]]
        check=lst[0]
        i=0
        while i <len(lst):
            if lst[i]==check:
               lst.remove(lst[i])
               i=i
            else:
               i=i+1
    return new


def remove_extras(lst):
    new = []

    for i in lst:
        if i not in new:
            new = new + [i]
    return new


def remove_extras(lst):
    answer = []
    for i in lst:
        unique = True
        for a in answer:
            if i == a:
                unique = False
                break
        if unique:
            answer += [i]
    return answer


def remove_extras(lst):
    t = []
    for n in lst:
        if t.count(n) == 0:
            t = t + [n,]
    return t


def remove_extras(lst):
    newlst = []
    for item in lst:
        if item not in newlst:
            newlst.append(item)
    return newlst


def remove_extras(lst):
    # your code here
    new_lst = []
    for i in lst:
        if i not in new_lst:
            new_lst += [i,]
    return new_lst


def remove_extras(lst):
    new_list=[]
    for i in lst:
        if i not in new_list:
            new_list.append(i)
    return new_list


def remove_extras(lst):
    l = []
    for i in lst:
        if i not in l:
            l += [i]
    return l


def remove_extras(lst):
    lst.reverse()
    for i in lst:
        if lst.count(i) > 1:
            lst.remove(i)
    lst.reverse()
    return lst


def remove_extras(lst):
    new = []
    for x in lst:
        if x not in new:
            new += [x]
    return new


def remove_extras(lst):
    if lst == []:
        return []
    else:
        lst1 = []
        for i in range(0,len(lst)):
            if lst[i] not in lst1:
                lst1 = lst1 + [lst[i]]
        return lst1


def remove_extras(lst):
    # your code here
    out = []
    for ele in lst:
        if not ele in out:
            out.append(ele)
    return out


def remove_extras(lst):
    newlist = []
    for i in lst:
      if i not in newlist:
        newlist.append(i)
    lst[:]= newlist
    return lst


def remove_extras(lst):
    result = []
    for elem in lst:
        if elem not in result:
            result.append(elem)
    return result


def remove_extras(lst):
    result=[]
    for i in lst:
        if i not in result:
            result.append(i)
        else:
            continue
    return result


def remove_extras(lst):
	new_list = []
	for x in lst:
		if x not in new_list:
			new_list.append(x)
	return new_list


def remove_extras(lst):
    lst1 = []
    for i in lst:
        if i not in lst1:
            lst1.append(i)
    return lst1


def remove_extras(lst):
    newlist = []
    for i in lst:
        if i in newlist:
            continue
        else:
            newlist += [i]
    return newlist


def remove_extras(lst):
    new_lst = []
    for ele in lst:
        if ele not in new_lst:
            new_lst.append(ele)
    return new_lst


def remove_extras(lst):
    new_lst=[]
    for i in lst:
        if i not in new_lst:
            new_lst+=[i]
    return new_lst


def remove_extras(lst):
    if lst == []:
        return []
    seq = [lst[0],]
    for i in lst:
        if i not in seq:
            seq = seq + [i,]
    return seq


def remove_extras(lst):
    newlst = []
    for elem in lst:
        if elem not in newlst:
            newlst.append(elem)
    return newlst


def remove_extras(lst):
    result = []
    for i in range(len(lst)):
        if lst[i] not in result:
            result += [lst[i],]
            continue
    return result


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if i in new_lst:
            new_lst
        else:
            new_lst.append(i)
    return new_lst


def remove_extras(lst):
    listt = []
    for i in lst:
        if i in listt:
            continue
        else:
            listt += [i]
    return listt


def remove_extras(lst):
    result = []
    for ele in lst:
        if ele not in result:
            result.append(ele)
    return result


def remove_extras(lst):
    new_list = []
    for item in lst:
        if new_list.count(item) == 0:
            new_list.append(item)
    return new_list


def remove_extras(lst):
    new = []
    for i in lst:
        if i not in new:
            new.append(i)
    return new


def remove_extras(lst):
    output = []
    for i in lst:
        if i not in output:
            output.append(i)
    return output


def remove_extras(lst):
    answer = []
    for x in lst:
        if x not in answer:
            answer.append(x)
    return answer


def remove_extras(lst):
    my_lst = []
    for i in lst:
        if i not in my_lst:
            my_lst.append(i)
    return my_lst


def remove_extras(lst):
    newlst = []
    for i in lst:
        if i not in newlst:
            newlst.append(i)
    return newlst


def remove_extras(lst):
    new_lst = []
    for i in range (len(lst)):
        if lst[i] not in new_lst:
            new_lst.append(lst[i])
    return new_lst
print(remove_extras([1,5,1,1,3,2]))


def remove_extras(lst):
    product = []
    for element in lst:
        if element in product:
            continue
        else:
            product = product + [element]
    return product


def remove_extras(lst):
    new = []
    for i in lst:
        if i not in new:
            new += [i]
    return new


def remove_extras(lst):
    new_lst = []
    for i in lst:
        new_lst.append(i)
        if new_lst.count(i) > 1:
            new_lst.pop()
            continue
    return new_lst


def remove_extras(lst):
    lst2=[]
    for i in lst:
        if i not in lst2:
            lst2+=[i]
    return lst2


def remove_extras(lst):
    new_lst = []
    for element in lst:
        if element in new_lst:
            continue
        else:
            new_lst += [element]
    return new_lst


def remove_extras(seq):
    new_lst = []
    for i in seq:
        if i not in new_lst:
            new_lst.append(i)
    return new_lst


def remove_extras(lst):
    result = []
    for i in lst:
        if i not in result:
            result.append(i)
    return result
    pass


def remove_extras(lst):
    non_extra = ()
    count = 0
    for el in lst:
        if el not in non_extra:
            non_extra += (el,)
        else:
           continue
    lst = list(non_extra)
    return lst


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if i not in new_lst:
            new_lst += [i,]
    return new_lst


def remove_extras(lst):
    lst_new = list()
    for i in lst:
        if (i in lst_new):
            continue
        else:
            lst_new.append(i)
    return lst_new


def remove_extras(lst):
    result = []
    for ele in lst:
        if ele not in result:
            result.append(ele)
    return result


def remove_extras(lst):
    newlst = []
    for item in lst:
        if item not in newlst:
            newlst.append(item)
    return newlst


def remove_extras(lst):
    new = []
    for i in lst:
        if i not in new:
            new += [i]
        else:
            continue
    return new


def remove_extras(lst):

    new = []

    for i in lst:
        if i not in new:
            new = new + [i]
    return new


def remove_extras(lst):
    index = 0
    listNumber = []
    result = []
    for i in lst:
        listNumber.append(i)
        count = 0
        for j in listNumber:
            if i == j:
                count += 1
        if count <= 1:
            result.append(i)
        index += 1
    return result


def remove_extras(lst):
    new = []
    for el in lst:
        if el not in new:
            new += [el,]
    return new


def remove_extras(lst):
    result = []
    for i in lst:
        if i not in result:
            result = result + [i]
    return result


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if i not in new_lst:
            new_lst.append(i)
    return new_lst


def remove_extras(lst):
    l=[]
    for i in lst:
        if i not in l:
            l.append(i)
    return l


def remove_extras(lst):
    wo_extras = []
    for i in lst:
        if i in wo_extras:
            continue
        wo_extras.append(i)
    return wo_extras
    pass


def remove_extras(lst):
    new = []
    for i in lst:
        if i not in new:
            new += [i]
    return new


def remove_extras(lst):
    newlist = []
    for i in lst:
        if i not in newlist:
            newlist.append(i)
    return newlist


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if i in new_lst:
            new_lst = new_lst
        else:
            new_lst += [i]
    return new_lst


def remove_extras(lst):
	s = []
	for i in lst:
		if i not in s:
			s.append(i)
	return s


def remove_extras(lst):
    newlst = []
    for elem in lst:
        if elem not in newlst:
            newlst.append(elem)
    return newlst


def remove_extras(lst):
    rem_lst=[]
    for i in lst:
        if rem_lst.count(i)==0:
            rem_lst+=[i]
    return rem_lst


def remove_extras(lst):
	current = []
	for i in lst:
		if i in current:
			continue
		else:
			current.append(i)
	return current


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if i not in new_lst:
            new_lst += [i,]
    return new_lst


def remove_extras(lst):
    pst=[]
    for i in lst:
        if i not in pst:
            pst.extend([i])
    return pst


def remove_extras(lst):
    newlist = []
    for i in lst:
        if i in newlist:
            continue
        else:
            newlist += [i]
    return newlist


def remove_extras(lst):
    newlst = []
    for i in lst:
        if i not in newlst:
            newlst.append(i)
    return newlst


def remove_extras(lst):
    lst.reverse()
    for elem in lst:
        while elem in lst[lst.index(elem)+1:]:
            lst.remove(elem)
            #reversing list to remove elements from the back.. I think?
    lst.reverse()
    new_lst = lst.copy()
    return new_lst


def remove_extras(lst):
    lsts = []
    for i in lst:
       if i not in lsts:
          lsts.append(i)
    return lsts


def remove_extras(lst):
    newlst = []
    for i in lst:
        if i not in newlst:
            newlst += [i]
    return newlst


def remove_extras(lst):
    res= []
    for i in lst:
        if res.count(i) == 0:
            res = res + [i]
        else:
            res = res
    return res


def remove_extras(lst):
    t = []
    for n in lst:
        if t.count(n) == 0:
            t = t + [n,]
    return t


def remove_extras(lst):
  lst2 = []
  for i in lst:
    if i not in lst2:
      lst2.append(i)
  return lst2


def remove_extras(lst):
    if lst == []:
        return []
    else:
        lst1 = []
        for i in range(0,len(lst)):
            if lst[i] not in lst1:
                lst1 = lst1 + [lst[i]]
        return lst1


def remove_extras(lst):
    lst1=[]
    for i in range (len(lst)):
        if lst[i] not in lst1:
            lst1 += [lst[i]]
    return lst1


def remove_extras(lst):
    new = []
    for i in lst:
        if i not in new:
            new.append(i)
    return new


def remove_extras(lst):
    new_list =[]
    for i in lst:
        if i not in new_list:
            new_list.append(i)
    return new_list


def remove_extras(lst):
    lsts = []
    for i in lst:
       if i not in lsts:
          lsts.append(i)
    lst = lsts
    return lst


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if i not in new_lst:
            new_lst.append(i)
    return new_lst


def remove_extras(lst):
	a = []
	for i in lst:
		if i not in a:
			a += [i,]
	return a


def remove_extras(lst):
	new_lst = []
	for element in lst:
		if (element in lst) and (element not in new_lst):
					 new_lst.append(element)
		else:
		    continue
	return new_lst


def remove_extras(lst):
    if lst == []:
        return lst
    else:
        one = [lst[0],]
        for repeat in lst:
            if repeat not in one:
                one += [repeat,]
        return one


def remove_extras(lst):
    # your code here
    n = 0
    a = lst
    while n < len(a):
        if a[n] in a[n+1:]:
            b = a[n+1:]
            b.remove(a[n])
            a = a[:n+1] + b
        else:
            n = n + 1
    return a


def remove_extras(lst):
    new_list = []
    if lst == []:
        return lst
    else:
        for i in lst:
            if i in new_list:
                continue
            else:
                new_list.append(i)
    return new_list


def remove_extras(lst):
    new = []
    for i in lst:
        if i not in new: #if its already in new, it would skip the element and wont add into the new listt.
            new += [i, ]
        else:
            continue
    return new


def remove_extras(lst):
    result = []
    for i in lst:
        if i not in result:
            result += [i]
    return result


def remove_extras(lst):
    newlst = []
    for i in lst:
        if i in newlst:
            continue
        newlst.append(i)
    return newlst


def remove_extras(lst):
    new_list = []
    for i in lst:
        if i not in new_list:
            new_list.append(i)
    return new_list


def remove_extras(lst):
    newlst = []
    [newlst.append(i) for i in lst if i not in newlst]
    return newlst


def remove_extras(lst):
    new = []
    for i in range(len(lst)):
        if lst[i] not in new:
            new.append(lst[i])
    return new


def remove_extras(lst):
    a=[]
    for i in lst:
        if i not in a:
            a.append(i)
    return a


def remove_extras(lst):
    a = []
    for i in lst:
        if i not in a:
            a.append(i)
    return a


def remove_extras(lst):
    new_lst = []
    for num in lst:
        if num not in new_lst:
            new_lst.append(num)
    return new_lst


def remove_extras(lst):
	new_lst = []
	for i in lst:
		if i not in new_lst:
			new_lst.append(i)
	return new_lst


def remove_extras(lst):
    l=[]
    for i in lst:
        if i not in l:
            l.append(i)
    return l


def remove_extras(lst):
    newlst=[]
    for i in lst:
        while i not in newlst:
            newlst.append(i)
    return newlst


def remove_extras(lst):
	new_list = []
	for x in lst:
		if x not in new_list:
			new_list.append(x)
	return new_list


def remove_extras(lst):
    list = []
    for element in lst:
        if element not in list:
            list.append(element)
        else:
            continue
    return list


def remove_extras(lst):
    if lst == []:
        return []
    else:
        a =[lst[0]]
        i = lst[0]
        for j in range (1,len(lst)): #while lst is not empty
            if i == lst[j]:
                continue
            else:
                a += [lst[j]]

        return a


def remove_extras(lst):
    removed = []
    for e in lst:
       if (e in lst) and (e not in removed):
          removed.append(e)
    return removed


def remove_extras(lst):
    new_lst = []
    for x in lst:
        if x not in new_lst:
            new_lst = new_lst + [x]
        else:
            continue
    return new_lst


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if i not in new_lst:
            new_lst.append(i)
    return new_lst


def remove_extras(lst):
	product = []
	for i in lst:
		if i not in product:
			product = product + [i]
	return product


def remove_extras(lst):
    new_list = []
    for number in lst:
       if number not in new_list:
           new_list.append(number)
    return new_list


def remove_extras(lst):
    new_list = []
    for x in lst:
        if (x in new_list) == False:
            new_list.append(x)
    return new_list


def remove_extras(lst):

    lst1=[]
    for i in lst:
        check=True
        for j in lst1:

            if j==i:
                check=False
        if check:
            lst1+=[i,]
    return lst1


def remove_extras(lst):
    product = []
    for i in lst:
        if i not in product:
            product.append(i)
        else:
            continue
    return product


def remove_extras(lst):
    new=[]
    for i in lst:
        if i not in new:
            new.append(i)
    return new
    pass


def remove_extras(lst):
    new_list = []
    for elem in lst:
        if elem not in new_list:
            new_list.append(elem)
    return new_list


def remove_extras(lst):
    rev_lst=lst.copy()
    rev_lst.reverse()
    ori_len=len(lst)
    new_lst=lst.copy()
    for i in range(ori_len):
        if rev_lst[i] in rev_lst[i+1:]:
            new_lst.pop(ori_len-i-1)
    return new_lst


def remove_extras(lst):
    # your code here
    n = 0
    a = lst
    while n < len(a):
        if a[n] in a[n+1:]:
            b = a[n+1:]
            b.remove(a[n])
            a = a[:n+1] + b
        else:
            n = n + 1
    return a


def remove_extras(lst):
    lst1 = []
    for item in lst:
        if (item in lst1):
            continue
        else:
            lst1 += [item,]
    return lst1


def remove_extras(lst):
    new_list = []
    for item in lst:
        if item not in new_list:
            new_list.append(item)
    return new_list


def remove_extras(lst):
    x = []
    for i in lst:
        if i not in x:
            x = x + [i,]
        else:
            continue
    return x


def remove_extras(lst):
    a=[]
    for i in lst:
        if i not in a:
            a.append(i)
    return a


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if i not in new_lst:
            new_lst = new_lst + [i,]
        else:
            continue
    return new_lst


def remove_extras(lst):
    new_list = []
    n = len(lst)
    for counter1 in range(n):
        if lst[counter1] not in new_list:
            new_list.append(lst[counter1])
    return new_list


def remove_extras(lst):
    newseq = []
    for element in lst:
        if element not in newseq:
            newseq += [element]
    return newseq


def remove_extras(lst):
    new = []
    for x in lst:
        if x not in new:
            new += [x]
    return new


def remove_extras(lst):
    result=[]
    for i in lst:
        if i in result:
            continue
        else:
            result+=[i,]
    return result
    pass


def remove_extras(lst):
    if lst==[]:
        return []
    new_lst=[lst[0]]
    for i in range(len(lst)):
        a=lst[i]
        for h in range(i,len(lst)):
            if a!=lst[h]:
                ele=lst[h]
                if ele in new_lst:
                    continue
                new_lst.append(ele)
    return new_lst


def remove_extras(lst):
    for i in lst:
        n = lst.index(i)
        lst = lst[:n+1] + list(filter(lambda x: x!=i, lst[n+1:]))
    return lst


def remove_extras(lst):
    lst.reverse()
    for elem in lst:
        while elem in lst[lst.index(elem)+1:]:
            lst.remove(elem)
            #print(lst)
    lst.reverse()
    return lst


def remove_extras(lst):
    lst.reverse()
    for elem in lst:
        while elem in lst[lst.index(elem)+1:]:
            lst.remove(elem)
            #print(lst)
    lst.reverse()
    new_lst = lst.copy()
    return new_lst


def remove_extras(lst):
    lst.reverse()
    for elem in lst:
        while elem in lst[lst.index(elem)+1:]:
            lst.remove(elem)
            #reversing list to remove elements from the back.. I think?
    lst.reverse()
    new_lst = lst.copy()
    return new_lst

#Don't really understand the new list part. Does this mean they don't want me to modify
#the list that was input? Will making a shallow copy at the end suffice?


def remove_extras(lst):
    result = []
    for i in lst:
        if i not in result:
            result = result + [i]
    return result


def remove_extras(lst):
  lst2 = []
  for i in lst:
    if i not in lst2:
      lst2.append(i)
  return lst2


def remove_extras(lst):
    n = 0
    while n < len(lst):
        if lst[n] in lst[n+1:]:
            ext = lst[n+1:]
            ext.remove(lst[n])
            lst = lst[:n+1] + ext
        else:
            n = n + 1
    return lst


def remove_extras(lst):
    new_lst = []
    for x in lst:
        if x not in new_lst:
            new_lst = new_lst + [x]
        else:
            continue
    return new_lst


def remove_extras(lst):
    new_list = []
    for element in lst:
        if element in new_list:
            continue
        else:
            new_list.append(element)
    return new_list


def remove_extras(lst):
    i=0
    new = []
    while i<=len(lst)-1:
        curr = lst[i]
        new += [curr,]
        for ele in lst:
            if ele == curr:
                continue
            new += [ele,]
        lst = new.copy()
        new = []
        i +=1
    lst.reverse()
    return lst


def remove_extras(lst):

    def position(i,seq):
        n = len(seq)
        for j in range(n):
            if seq[j] == i:
                return j
    def helper(start,i):
        for k in lst[start:]:
            if k == i:
                n_pos = position(k,lst[start:])+ index +1
                print(k,n_pos)
                lst.pop(n_pos)
    for i in lst:
        index = position(i,lst)
        helper(index+1,i)

    return lst


def remove_extras(lst):
	new = []
	for element in lst:
		if element not in new:
			new.append(element)
	return new


def remove_extras(lst):
    list = []
    for element in lst:
        if element not in list:
            list.append(element)
        else:
            continue
    return list


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if i not in new_lst:
            new_lst.append(i)

    return new_lst


def remove_extras(lst):
    listt = []
    for i in lst:
        if i in listt:
            continue
        else:
            listt += [i]
    return listt


def remove_extras(lst):
    new_lst = []
    for num in lst:
        if num not in new_lst:
            new_lst += [num]
    return new_lst


def remove_extras(lst):
    #your code here
    result = []
    for entry in lst:
        if entry not in result:
            result = result + [entry]
    return result


def remove_extras(lst):
	new = []
	for i in lst:
		if i not in new:
			new.append(i)
	return new


def remove_extras(lst):
    new_lst = []
    for num in lst:
        if num not in new_lst:
            new_lst.append(num)
    return new_lst


def remove_extras(lst):
    new = []
    for i in lst:
        if i not in new:
            new.append(i)
    return new


def remove_extras(lst):
    newseq = []
    for element in lst:
        if element not in newseq:
            newseq += [element]
    return newseq


def remove_extras(mylist):
    newlist=[]
    for i in mylist:
        if i not in newlist:
            newlist.append(i)
    return newlist


def remove_extras(lst):
    result = []
    for i in lst:
        if i not in result:
            result.append(i)
        else:
            continue
    return result


def remove_extras(lst):
    new_lst=[]
    for i in lst:
        if i not in new_lst:
            new_lst.append(i)
    return new_lst


def remove_extras(lst):
    if lst==[]:
        return []
    new_list=[lst[0]]
    for i in lst:
        if i in new_list:
            continue
        else:
            new_list.append(i)
    return new_list


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if i not in new_lst:
            new_lst += [i,]
    return new_lst


def remove_extras(lst):
    i=1
    if lst==[]: return lst

    while i!=len(lst):
        if lst[i] in lst[:i]:
            del lst[i]
            continue
        i+=1
    return lst


def remove_extras(lst):
    new_lst = []
    for i in range(len(lst)):
        if lst[i] not in new_lst:
            new_lst += [lst[i]]
    return new_lst


def remove_extras(lst):
	a = []
	for i in lst:
		a = a+[i,]
		if a.count(i)>1:
			a.pop()
	return a


def remove_extras(lst):
    new_lst = []
    for i in lst:
        if i not in new_lst:
            new_lst.append(i)
    return new_lst


def remove_extras(lst):
    newLst=[]
    for i in lst:
        if i not in newLst:
            newLst.append(i)
        else:
            continue
    return newLst


def remove_extras(lst):
    new_list = []
    for number in lst:
       if number not in new_list:
           new_list.append(number)
    return new_list


def remove_extras(lst):
    newlist = []
    for element in lst:
        if newlist.count(element)==0:
            newlist.append(element)
    return newlist
    pass


def remove_extras(lst):
    new = []
    for ele in lst:
        if ele not in new:
            new = new + [ele,]
    return new# your code here


def remove_extras(lst):
    lst_new=[]
    l=len(lst)
    for i in range (l):
        if lst[i] in lst_new:
            continue
        else:
            lst_new.append(lst[i])
    return lst_new


def remove_extras(lst):
    a =[]
    for i in lst:
        if i not in a:
            a = a + [i,]
        else:
            continue
    return a
    pass


def remove_extras(lst):
    new_lst = []
    added = set()
    for val in lst:
        if not val in added:
            new_lst.append(val)
            added.add(val)
    return new_lst


def remove_extras(lst):
    # your code here
    new_list = []
    for i in lst:
        if i not in new_list:
            new_list = new_list + [i]
    return new_list


def remove_extras(lst):
    empty_list = []
    for i in lst:
        if i not in empty_list:
            empty_list += [i]
    return empty_list
    pass


def remove_extras(lst):
	new_list = []
	for i in lst:
		if i not in new_list:
			new_list.append(i)
	return new_list


def remove_extras(lst):
	if lst == []:
		return []
	elif lst[-1] in lst[:-1]:
		return remove_extras(lst[:-1])
	else:
		return remove_extras(lst[:-1]) + [lst[-1]]


from collections import OrderedDict

def remove_extras(lst):
    return list(OrderedDict.fromkeys(lst))


def remove_extras(lst):
    a=[]
    for i in lst:
        if i not in a:
            a+=[i]
    return a


def remove_extras(lst):
    new_lst = []
    for i in range (len(lst)):
        if lst[i] not in new_lst:
           new_lst += [lst[i]]

    return new_lst


def remove_extras(lst):
    new_lst = []
    for i in range(len(lst)):
	    if lst[i] not in new_lst:
		    new_lst.append(lst[i])
    return new_lst


def remove_extras(lst):
    s = []
    for n in lst:
        if n not in s:
           s.append(n)
    return s


def remove_extras(lst):
	re=()
	uni=[]
	for ele in lst:
		if ele not in re:
			re+=(ele,)
			uni+=[ele]
		else:
			continue
	return uni


def remove_extras(lst):
    lst.reverse()
    for element in lst:
        if lst.count(element) > 1:
            lst.remove(element)
    lst.reverse()
    return lst


def remove_extras(lst):
    new_list = []
    for elem in lst:
        if elem not in new_list:
            new_list.append(elem)
    return new_list


def remove_extras(lst):
    lst_new=[]
    for i in range (len(lst)):
        if lst[i] in lst_new:
            continue
        else:
            lst_new.append(lst[i])
    return lst_new


def remove_extras(lst):
    new_list = []
    for i in lst:
        if i not in new_list:
            new_list.append(i)
    return new_list


def remove_extras(lst):
    new_list = []
    for x in lst:
        if (x in new_list) == False:
            new_list.append(x)
    return new_list


def remove_extras(lst):
    lst2 = []
    for i in lst:
        if i not in lst2:
            lst2.append(i)
    return lst2


def remove_extras(lst):
    newlist = []
    for i in lst:
        if i not in newlist:
            newlist += i,
    return newlist


def remove_extras(lst):
    result = []
    for i in lst:
        if i in result:
            continue
        else:
            result.append(i)
    return result


def remove_extras(lst):
    a = []
    for i in lst:
        if i not in a:
            a.append(i)
    return a
    pass


def remove_extras(lst):
    s = []
    for i in lst:
        if i not in s:
            s.append(i)
    return s


def remove_extras(lst):
    output = []
    for item in lst:
        if item not in output:
            output.append(item)
    return output


def remove_extras(lst):
    new = []
    for x in lst:
        if x not in new:
            new.append(x)
    return new


def remove_extras(lst):
    result = []
    for i in lst:
        if i not in result:
            result.append(i)
        else:
            continue
    return result


def remove_extras(lst):
    if lst == []:
        return []
    else:
        result = [lst[0],]
        for e in lst:
            if e not in result:
                result.append(e)
            else:
                continue
        return result


def remove_extras(lst):
    newlist=[]
    for i in lst:
        if i not in newlist:
            newlist += [i,]
    return newlist


def remove_extras(lst):
    new_list = []
    for x in lst:
        if x not in new_list:
            new_list += [x]
    return new_list


def remove_extras(lst):
    newlst = []
    while len(lst) > 0:
        x = lst[0]
        newlst.append(x)
        lst.remove(x)
        while x in lst:
            lst.remove(x)
    return newlst


def remove_extras(lst):
    output = []
    for i in lst:
        if i not in output:
            output.append(i)
    return output


def remove_extras(lst):
    lst2 = []
    for x in lst:
        if x not in lst2:
            lst2.append(x)
    return lst2


def remove_extras(lst):
    l = []
    for i in lst:
       if i not in l:
          l.append(i)
    return l


def remove_extras(lst):
    newlst=[]
    for i in lst:
        if i not in newlst:
            newlst.append(i)
    return newlst


def remove_extras(lst):
    new = []
    for i in lst:
        if i not in new:
            new.append(i)
        else:
            new = new
    return new


def remove_extras(lst):
    new = []
    for i in lst:
        if i not in new:
            new = new + [i,]
        else:
            new = new
    return new


def remove_extras(lst):
    new_lst  = []
    for i in lst:
        if i not in new_lst:
            new_lst.append(i)
    return new_lst


def remove_extras(lst):
    new_list = []
    if lst == []:
        return lst
    else:
        for i in lst:
            if i in new_list:
                continue
            else:
                new_list.append(i)
    return new_list


def remove_extras(lst):
    newlist = []
    for number in lst:
       if number not in newlist:
           newlist.append(number)
    return newlist


def remove_extras(lst):
    new_list=[]
    for i in range(len(lst)):
        judge=0
        for j in range(i):
            if lst[i]==lst[j]:
                judge=1
        if judge==0:
            new_list+=[lst[i],]
    return new_list
    # your code here
    pass


def remove_extras(lst):
    new_lst=[]
    for x in lst:
        if x in new_lst:
            new_lst=new_lst
        else:
            new_lst+=[x,]
    return new_lst


def remove_extras(lst):
    new = []
    if lst == []:
        return lst
    else:
        for i in lst:
            if i in new:
                continue
            else:
                new.append(i)
    return new