Skip to content

Instantly share code, notes, and snippets.

@curiositycasualty
Last active December 15, 2016 02:15
Show Gist options
  • Save curiositycasualty/a3f84b0b82e14ebf2a2eda3f1fb8a0af to your computer and use it in GitHub Desktop.
Save curiositycasualty/a3f84b0b82e14ebf2a2eda3f1fb8a0af to your computer and use it in GitHub Desktop.
Python 2.7.5 (default, Nov 20 2015, 02:00:19)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> a=set('yay')
>>> a.add('yay')
>>> a
set(['y', 'a', 'yay'])
>>> a.add('yay')
>>> a
set(['y', 'a', 'yay'])
>>> a.clear()
>>> a
set([])
>>> a.add('yay')
>>> a
set(['yay'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment