Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Using set comprehension

>>> a = {x for x in 'abracadabra' if x not in 'abc'}
>>> a
{'r', 'd'}
Source by docs.python.org #
 
PREVIOUS NEXT
Tagged: #Using #set #comprehension
ADD COMMENT
Topic
Name
9+8 =