結果 : java streams equivalent in python