python array_walk() alternative -



python array_walk() alternative -

i have list looks this:

list = [1,2,3,4]

i add together 12 each value. in php can utilize array_walk process each item in array. there similar function or easier way doing loop such as:

for in list:

thanks

use list comprehensions. seek this:

list = [i+12 in list]

python

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -