Reduce In Lambda Python Function