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

java - How to pass parameters between Request-Scoped Controllers? -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -