Python rstrip()方法
Python 教程
· 2019-02-02 17:29:31
描述
Python rstrip() 删除 string 字符串末尾的指定字符(默认为空格).
语法
rstrip()方法语法:
str.rstrip([chars])
参数
- chars -- 指定删除的字符(默认为空格)
返回值
返回删除 string 字符串末尾的指定字符后生成的新字符串。
实例
以下实例展示了rstrip()函数的使用方法:
#!/usr/bin/python
str = " 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!!!
点击查看所有 Python 教程 文章: https://www.codercto.com/courses/l/8.html
Series 60 应用程序开发
巴克 / 人民邮电出版社 / 2005-7 / 75.0
Series 60智能手机开发平台正掀起新一轮的移动服务浪潮。超过60%的手机生产商获得了Series 60平台的授权。Series 60移动应用开发平台拥有最大的用户群,从而成为智能手机市场的代表。诺基亚与EMCC软件公司合作,为C++程序员和软件设计师编撰了这本Series 60开发的权威指南。本书由诺基亚资深专家进行了全面审阅。本书内容涉及了开发过程的各个阶段,从设计、编程、测试、调试到部署......一起来看看 《Series 60 应用程序开发》 这本书的介绍吧!