社区所有版块导航
Python
python开源   Django   Python   DjangoApp   pycharm  
DATA
docker   Elasticsearch  
aigc
aigc   chatgpt  
WEB开发
linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery  
机器学习
机器学习算法  
Python88.com
反馈   公告   社区推广  
产品
短视频  
印度
印度  
Py学习  »  Python

如何在python中删除字符串中的某些空格?[副本]

user10361610 • 5 年前 • 1704 次点击  

我知道有几个类似的问题,但我找不到解决我的问题的方法。 我有一根绳子,它是:

"subject: Exercise Feedback Form
persona_id: bresse
Q1: Yes
Q1 comments: Yes everything was found A1
Q2: No
Q2 comments: No forgot to email me A2
Q3: Yes
Q3 comments: All was good A3
Q4: No
Q4 comments: It was terrible A4
Q5_comments: Get Alex to make it better






























subject: Issue With App
persona_id: bresse
comments: Facebook does not work comments feedback"

正如你所看到的,中间有大量的白色空间。我如何使用python删除这个?

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/39191
 
1704 次点击  
文章 [ 5 ]  |  最新文章 5 年前