Created
December 30, 2020 22:33
-
-
Save alphazwest/856651a8cd217ddc1720f86c645e230d 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
# Create a new set object | |
set_one = {1, 2, 3} | |
>>> {1, 2, 3} | |
# Update with tuple value | |
set_one.update((4, 5, 6, 6)) | |
>>> {1, 2, 3, 4, 5, 6} | |
# Update with iterable containing tuple | |
set_one.update(((7, 8, 9, 9), )) | |
>>> {1, 2, 3, 4, 5, 6, (7, 8, 9, 9)} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment