Musings & ramblings of a Pythonista
Python provides a builtin map
function which applies a method over a list of entities. This function comes handy in a lot of situations as in
# find the square of all integers in a list # Eg: # input: [1, 2, 3, 4] # return: [1, 4, 9, 16] map(lambda x: x*x, list_of_integers)
Similar functionality can be achieved in linux commandline using a combination of unix pipe |
and xargs
command. For ...