DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
if statement in one-line for loop python
>>> [(i) for i in my_list if i=="two"] ['two']
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#statement
#loop
#python
ADD COMMENT
Topic
COMMENT
Name
2+3 =
Submit