Как убрать пунктуацию только в начале и конце слова в предложении, используя python - PullRequest
0 голосов
/ 27 апреля 2020

Как убрать пунктуацию только в начале и конце строки в Python 3.7?

Пример ввода:

("This is - (the) example) _sentence () ."Independent" punctuation _ should remain preserved. @ I.tried ( ) but , couldn't solve,_". 

Желаемый вывод:

This is - the example sentence () Independent punctuation _ should remain preserved @ I.tried ( ) but , couldn't solve
...