Skip to content

Instantly share code, notes, and snippets.

@Abhayparashar31
Created December 14, 2020 03:44
Show Gist options
  • Save Abhayparashar31/dc70bdd685354592bfab181efdc9bc2c to your computer and use it in GitHub Desktop.
Save Abhayparashar31/dc70bdd685354592bfab181efdc9bc2c to your computer and use it in GitHub Desktop.
numbers = [1,2,3,4,5]
fSet = frozenset(numbers)
print('frozen set:', fSet)
>> frozen set: frozenset({1, 2, 3, 4, 5})
fSet.add('8')
>>AttributeError: 'frozenset' object has no attribute 'add'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment