python 集合元素添加

#A new empty set  
color_set = set()  
color_set.add("Red")  
print(color_set)  
#Add multiple items  
color_set.update(["blue","blue", "Green"])  
print(color_set)

猜你喜欢

转载自www.cnblogs.com/sea-stream/p/9949599.html
今日推荐