DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
sum of elements in a list.
data = ['5', '4', '9'] sum(int(i) for i in data) 18
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#sum
#elements
ADD COMMENT
Topic
COMMENT
Name
3+4 =
Submit