gpt4 book ai didi

python - 删除不在引号内的空格

转载 作者:太空宇宙 更新时间:2023-11-04 01:29:55 25 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
Python Regular expression must strip whitespace except between quotes

我需要删除文件中不在单引号或双引号内(即不在字符串中)的所有空格。

我找到了这个解决方案 Python Regular expression must strip whitespace except between quotes

但这只适用于双引号

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com