Python中可以使用以下方法去掉字符串中的引号:
strip()方法去掉字符串两边的引号:string = '"Hello, World!"' new_string = string.strip('"') print(new_string) # Output: Hello, World! string = '"Hello, World!"' new_string = string[1:-1] print(new_string) # Output: Hello, World! replace()方法将引号替换为空字符串:string = '"Hello, World!"' new_string = string.replace('"', '') print(new_string) # Output: Hello, World! 请注意,以上方法只能去掉字符串两边的引号,如果字符串中间还包含引号,需要根据具体情况进行处理。