Python字符串操作---rstrip()方法
来源:互联网 发布:网络博客拉人方法 编辑:程序博客网 时间:2024/06/05 18:24
描述
Python rstrip() 删除 string 字符串末尾的指定字符(默认为空格).
语法
rstrip()方法语法:
str.rstrip([chars])
参数
- chars – 指定删除的字符(默认为空格)
返回值
返回删除 string 字符串末尾的指定字符后生成的新字符串
示例
#!/usr/bin/pythonstr = " this is string example....wow!!! ";print str.rstrip();str = "88888888this is string example....wow!!!8888888";print str.rstrip('8');
以上示例输出结果如下:
this is string example....wow!!!88888888this is string example....wow!!!
阅读全文
0 0
- Python字符串操作---rstrip()方法
- 【C++实现python字符串函数库】strip、lstrip、rstrip方法
- python strip()与rstrip() 方法
- Python strip lstrip rstrip使用方法(字符串处理空格)
- Python strip lstrip rstrip使用方法(字符串处理空格)
- Python strip lstrip rstrip使用方法(字符串处理空格)
- Python strip lstrip rstrip使用方法(字符串处理空格)
- 【详解】python中字符串的strip(),lstrip(),rstrip()的含义
- python字符串处理rstrip()、lstrip()、strip()函数使用
- python中strip\lstrip\rstrip的使用方法(字符串处理)
- Python中的strip()和lstrip()以及rstrip()方法的使用
- strip,lstrip,rstrip Python
- python rstrip lstrip
- python- strip lstrip rstrip
- Python-strip(),lstrip(),rstrip()
- python:strip()、rstrip()、lstrip()
- python-strip lstrip rstrip
- Python strip lstrip rstrip使用方法
- 微服务部署:蓝绿部署、滚动部署、灰度发布、金丝雀发布
- 解决无限嵌套文件夹无法删除的问题[WIN10]
- 移动端的meta标签
- TensorFlow 数据读取
- mysql批量更改表中字段的编码格式
- Python字符串操作---rstrip()方法
- 贝贝网java开发 20171102
- 10.23-11.06
- H5 meta 属性
- 头部信息 $_SERVER
- TCHAR和CHAR类型的互转
- (二)工程建立与初始化
- [2017纪中11-6]奇怪的队列 树状数组+二分/线段树
- UVA1518 Train delays