In this Python set program, we will create a set of favorite actors with the help of the below-given steps.
What is set?
Sets are used to store multiple items in a single variable.
The set is one of 4 built-in data types in Python used to store collections of data.
It is an unordered collection data type that is iterable, mutable and has no duplicate elements.
Set of favorite actors:
Steps to solve the program
1. Create a set using {}.
2. Add name of your favorite actors in the set.
3. Print the set to see the output.
Output :
Related Articles
Python program to create a set of your favorite movies.
Python program to create two sets of books and find the intersection of sets.
Python program to find the longest word in a set.
Python program to create a set with some elements.
Python program to add an element to a set.
Python program to remove an element from a set.