Page 1 of 1

Python: Making a Set

Posted: Tue Apr 07, 2026 5:24 pm
by Jason

Code: Select all

# Sets are unordered, with no duplicates and elements can be modified.

set_of_some_odd_numbers = {3, 11, 9, 7, 15}

print(set_of_some_,odd_numbers)

set_of_some_US_city_names = set(("Miami", "Chicago", "Los Angeles"))

print(set_of_some_US_,city_names)