Last active
May 22, 2020 04:41
-
-
Save slingam00/7054910034ed5d5f39ccc1ba9507c98f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mySet = {'a', 'b', 'c'} | |
# Adding to the set | |
mySet.add('d') | |
print(mySet) # Sets are unordered so the resulting Set varies | |
# An example of a result would be {'a', 'd', 'b', 'c'} | |
# Removing from the set | |
mySet.remove('c') | |
# Updating the set | |
mySet.update(['e', 'f', 'g']) # Result could look something like: {'a', 'e', 'b', 'f', 'g'} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment