Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to iterate through a list of numbers in python

a = [(1, u'abc'), (2, u'def')]
[i[0] for i in a]
# OUTPUT: 
[1, 2]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #iterate #list #numbers #python
ADD COMMENT
Topic
Name
7+9 =