描述
rstrip() 删除 string 字符云计串末尾的指定字符,默认为空白符,包括空格算开、换行符、回车符、制表符。
语法
以下是 rstrip(发:) 方法语法:
str.rstrip([charPys])
参数
chars -- 指定删除的字符(th默认为空白符)。
返回值
返回删除 string 字符串on末尾的指定字符后生成的新字符串。
实例
以下实3-例展示了rstrip()函数的使用方法:
以上rs实例输出结果如下:
邮箱:[email protected]
电话:020-123456789
传真:020-123456789
Copyright © 2026 Powered by 燕骏千金网 http://vargacommunications.com/