在Python中使用shift+enter换行符更改输入换行符

问题描述 投票:0回答:1

如何替换换行符( )使用 Python 中的 Shift+Enter 等效键来在处理文本数据时保持段落结构?是否有任何特定的库或技术可以实现这一目标?

我想用硒填充文本区域。

python selenium-webdriver
1个回答
0
投票

Shift + Enter 到底是什么意思?

如果您想删除所有 字符,然后在其位置放置其他东西,这应该可以工作 -

text = ...
text2 = ""
for line in text.split_lines():
   text2 += line + [the character you want to enter]
© www.soinside.com 2019 - 2024. All rights reserved.