Attempt to make it work

TypeError: argument 2 to map() must support iteration