How can I programmatically build a string containing escaped characters to pass as an argument to a function in Python?
How can I programmatically build a string containing escaped characters to pass as an argument to a function in Python? Question: I am trying to build the string below programatically: string0 = ‘case when "LETTER" in (‘a’,’b’) then "LETTER" else ‘other letter’ end’ I do: a_list = [‘a’,’b’] string = ‘(\”+’\’,\”.join(a_list)+’\’)’ string2 = ‘case when …