結果 : how to apply a function to an array python