Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to add to an exsiting value of an index in a list

foo = [1, 2, 3, 4, 5]
foo[3] = foo[3] + 4     
print(foo)            # [1, 2, 3, 8, 5]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #exsiting #index #list
ADD COMMENT
Topic
Name
3+5 =