Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

list comprehension python with condition

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