Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

if else in list comprehension

[f(x) if condition else g(x) for x in sequence]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #list #comprehension
ADD COMMENT
Topic
Name
4+3 =