DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
python enumerate in list comprehension with if statement
my_list = [0,1,2] [i for i, w in enumerate((_ for _ in my_list if _ != 1)) ]
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#python
#enumerate
#list
#comprehension
#statement
ADD COMMENT
Topic
COMMENT
Name
7+8 =
Submit