A single line way to populate a map from a list in Python 3

Viewed 196

I'm porting the equivalent of this code from Python 2.x to Python 3.x

def funk(arg):
    return "%s" % str(arg)

args = map(funk, [1, 2, 3, 4])
args += [5, 6, 7, 8]

The last line as of Python 3 gives the error

TypeError: unsupported operand type(s) for +=: 'map' and 'list'

How can I replace the last line with a single line of code?

1 Answers
Related