Something along the lines of: print([-1,2,-3,4,-5](abs)) #[1,2,3,4,5] print([-1,2,-3,4,-5](lambda a,b: a*a+b*b)) #1373609