在Python中,我们可以使用字符串的 replace() 方法来将 \r\n 替换为新的一行。 下面是一个例子: # 定义一个字符串 str1 = 'hello\r\nworld\r\n' # 使用replace() 方法 ...
確定! 回上一頁