Set in python are also similar as the list but in set items can never be repeated but in list items may repeated. Set is a immutable data type because in set , items value are not changes or index operation is not allowed.
Even in set any kind of index operation is not allowed.
Example of set:-
When we try to print this set then it display only three item 1,2 and 3 because repetition are not allowed in set.
It is also invalid because set data type are immutable so we can't change the index item in this manner
In this program , we simply create the set data type and display its value and length then discard() function are used to remove the specified item in set and then add() functions are used to add new item in the set and clear() function are used to clear or remove all items in the set.