返回顶部

收藏

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

更多
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

标签:Python,Data,Structure

收藏

0人收藏

支持

0

反对

0

发表评论