# -*- coding: UTF-8 -*-
# 作者：huanhuilong
# 标题：Python 内置类型
# 描述：内置类的使用，列表元素去重+过滤小于3的元素


def remove_duplicates(items):
    res = list(set(items))
    return res


def filter_element(items, bound):
    res = []
    for item in items:
        if item >= bound:
            res.append(item)
    return res


if __name__ == '__main__':
    a = [1, 2, 3, 4, 4, 5, 5]
    print('输入: {}'.format(a))
    res = remove_duplicates(a)
    print('去重后的结果：{}'.format(res))

    bound = 3
    res = filter_element(a, bound)
    print('过滤小于{}的元素:{}'.format(bound, res))
