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