Как заменить \r или \n в \r\n python2.7Python

Программы на Python
Anonymous
Как заменить \r или \n в \r\n python2.7

Сообщение Anonymous »

Как заменить \r или \n в \r\n в Python 2.7?
Входная строка = 'hello\r\n\n world\n \r\r\ n\r\n'

Выходная строка = 'hello\r\n\r\n world\r\n \r\n\r\n\r\n'

Подробнее здесь: https://stackoverflow.com/questions/784 ... -python2-7

Вернуться в «Python»