DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
python list iterate in 1 line
mylist = [1,4,5,8,9,11,13,12] newlist = [x for x in mylist if x%2 == 1] print(newlist)
Source by www.delftstack.com #
PREVIOUS
NEXT
Tagged:
#python
#list
#iterate
#line
ADD COMMENT
Topic
COMMENT
Name
8+3 =
Submit