Reduce Map And Filter Function Python Format String With Variables