dict类型单引号替换为双引号 arr=[‘a’,‘b’,‘c’] arr = str(arr).replace("’", “”").replace(r"\n", “”) str类型替换 str1 =‘a’,‘b’,‘c’ str1 = str1 .replace("’", “”")