📜  使用 rstrip() 方法从字符串中删除换行符 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:36.754000             🧑  作者: Mango

代码示例1
# rstrip() method to remove trailing newline character from a string
text= "Welcome to Python Programming \n"
print(text.rstrip())