union函数
a , b 两个集合
中所有的元素(去除重复)即为a与b的并集
并集
,即包含了所有集合的元素,重复的元素只会出现一次
b_set...
: 与当前集合
对比的1或多个集合并集
# coding:utf-8
a_school = ['周五半天', '免费周末培训', '周五休息']
b_school = ['放学时间从6点改为5点', '作业少留点', '换舒服的座椅']
c_school = ['作业少留点', '周五半天', '伙食改善']
a_set = set(a_school)
b_set = set(b_school)
c_set = set(c_school)
print(a_set)
print(b_set)
print(c_set)
# help_date = a_set.union(b_set, c_set)
help_date = a_set.union(b_school, c_school)
print(help_date)
print(len(help_date))