Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python list comprehension if else

# if/else
[f(x) if condition(x) else '' for x in sequence]
 
PREVIOUS NEXT
Tagged: #python #list #comprehension
ADD COMMENT
Topic
Name
7+4 =