Page 1 of 1

Python: Making a Set

Posted: Mon Aug 25, 2025 5:50 am
by The 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)