Make 2 sets out of sequences: Intersection, Union, Differenc

2019-06-16 02:09栏目:技术创新

X = set('spam') 
Y = set(['h', 'a', 'm'])                      # Make 2 sets out of sequences
print X, Y 
print X & Y                                   # Intersection
print X | Y                                   # Union
print X - Y                                   # Difference

版权声明:本文由新浦京娱乐站_新浦京娱乐场官网_新浦京娱乐发布于技术创新,转载请注明出处:Make 2 sets out of sequences: Intersection, Union, Differenc