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 -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -