Using Sets for Unique Collections in Python


Create a set for an unordered collection of unique elements.

Source Code

my_set = {1, 2, 3, 4, 4, 5}
print(my_set)  # Duplicates removed
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments