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