fruits = {‘apple’, ‘banana’, ‘cherry’} x = frozenset(fruits) # x[1] = “strawberry” #Attempting to modify a frozenset will result in a TypeError
# If you need to modify the set, we need to use a regular set instead
fruits.add(“strawberry”)
print(fruits)
Report
There was a problem reporting this post.
Block Member?
Please confirm you want to block this member.
You will no longer be able to:
See blocked member's posts
Mention this member in posts
Invite this member to groups
Message this member
Add this member as a connection
Please note:
This action will also remove this member from your connections and send a report to the site admin.
Please allow a few minutes for this process to complete.