def find_the_single_element(my_list):
    """
    Given a non-empty list of integers, every element appears twice except for one. Find that single one.
    :param my_list:
    :return:
    """
    duplicates = []
    my_set = set()
    for i in my_list:
        length_one = len(my_set)
        my_set.add(i)
        length_two = len(my_set)
        if length_one == length_two:
            duplicates.append(i)

    return [i for i in my_list + duplicates if i not in my_list or i not in duplicates]
    # list_dif = []
    # for i in my_list + duplicates:
    #     if i not in my_list or i not in duplicates:
    #         list_dif.append(i)
    # return list_dif