I have a Python list consisting of integers:
a = [1, 2, 3]
I want to pass the items of this list as arguments to a function, and they must be strings:
myfunc("1", "2", "3")
How can I do it?
So... we use the * operator to use a sequence as multiple arguments for a function call; and we want to convert each argument to a string. The conversion is most obviously and simply done by just passing the value to the builtin str; we can then just map that conversion function onto the list. These are all elementary techniques and all we have to do is put them together:
myfunc(*map(str, a))
map() are extraneous.* is typically applied to a generator expression. I removed the extra parens and added some explanation.