map is a function, not a list method.
params = ",".join(map(lambda x: "?", flagged_job_names))
By the way, you can use a list expression or a generator expression instead of map :
params = ",".join("?" for x in flagged_job_names)
But for this particular case, the following are possible:
params = ",".join(["?"] * len(flagged_job_names)) params = ",".join("?" * len(flagged_job_names))
The latter is possible because the string ( ? ) Is single-character.
source share