How do you create a set with 3 values in Python?

Experience Level: Junior
Tags: Python

Answer

Example:

my_set = {"red", "amber", "green"}
print(my_set)
Python for beginners
Python for beginners

Are you learning Python ? Try our test we designed to help you progress faster.

Test yourself