DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
9+8 =
Submit