Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

item[0]: (i + 1) * 2 for i, item in (sort_loc)

def double_stuff(a_list):
    """ Overwrite each element in a_list with double its value. """
    for (idx, val) in enumerate(a_list):
        a_list[idx] = 2 * val

things = [2, 5, 9]
double_stuff(things)
print(things)
Source by openbookproject.net #
 
PREVIOUS NEXT
Tagged: #item
ADD COMMENT
Topic
Name
7+9 =