私信  •  关注

Nordle

Nordle 最近创建的主题
Nordle 最近回复了
7 年前
回复了 Nordle 创建的主题 » 删除python中的双引号

干得好:

string = '''"('test')"'''

print(string.strip('"'))

>>> ('test')

使用 strip 可以从字符串中删除任何字符。