merging items in a list - python,"from functools import reduce