programming-examples/python/Sets/Python program to add member(s) in a set.py

7 lines
165 B
Python
Raw Normal View History

2019-11-15 12:59:38 +01:00
#A new empty set
color_set = set()
color_set.add("Red")
print(color_set)
#Add multiple items
color_set.update(["Blue", "Green"])
print(color_set)