If you want to remove only trailing newline, use rstrip() function else you can use other mentioned functions such as strip(), brute force approach, and re.sub ...
確定! 回上一頁