How to remove \r\n from a string in Python

1 Answer

0 votes
_str = '\r\npython c c++ php java c#\r\n'

_str = _str.strip()

print(_str)




'''
run:

python c c++ php java c#

'''

 



answered Jul 21, 2022 by avibootz

Related questions

1 answer 105 views
1 answer 109 views
1 answer 83 views
1 answer 92 views
92 views asked Sep 11, 2024 by avibootz
2 answers 205 views
205 views asked Jun 24, 2020 by avibootz
2 answers 231 views
...