【发布时间】:2016-09-30 07:03:15
【问题描述】:
您好,我不知道如何解释,我有这个问题。目前我有一些文字如下所示:
picture gallery
see also
adaptation
ecology
extreme environment clothing
extremophile
lexen life in extreme environments
natural environment
references
"extreme environment" microbial life np nd web 16 may 2013
feminism and gis refers to the use of geographic information system gis for feminist research and also how women influence gis at technological stages feminist gis research is aware of power differences in social and economic realms
history
我的问题是我如何才能得到这样的结果,例如:
picture gallery see also adaptation ecology extreme environment clothing extremophile lexen life in extreme environments natural environment references "extreme environment" microbial life np nd web 16 may 2013 feminism and gis refers to the use of geographic information system gis for feminist research and also how women influence gis at technological stages feminist gis research is aware of power differences in social and economic realms
我不确定这叫什么,但到目前为止,我找到的解决方案是删除所有我不需要的空格。
请帮帮我。
谢谢。
【问题讨论】:
-
首先是文件还是只是一些文本?
-
您可以通过重新添加历史来更正结果 - 或明确指出,这应从输入中删除(最后一个字或历史,尤其是... ;-)
-
抱歉回复晚了,是的,这是一个文件。
-
好的,迟到总比没有好:) - 我更新了我的答案。这应该尽可能好(当文件的内容不超过可用 RAM 时......)
标签: python regex python-2.7