Python lstrip()方法
Python 教程
· 2019-02-02 14:56:44
描述
Python lstrip() 方法用于截掉字符串左边的空格或指定字符。
语法
lstrip()方法语法:
str.lstrip([chars])
参数
- chars --指定截取的字符。
返回值
返回截掉字符串左边的空格或指定字符后生成的新字符串。
实例
以下实例展示了lstrip()的使用方法:
#!/usr/bin/python
str = " this is string example....wow!!! ";
print str.lstrip();
str = "88888888this is string example....wow!!!8888888";
print str.lstrip('8');
以上实例输出结果如下:
this is string example....wow!!! this is string example....wow!!!8888888
点击查看所有 Python 教程 文章: https://codercto.com/courses/l/8.html
React Native:用JavaScript开发移动应用
【美】Truong Hoang Dung(张皇容) / 奇舞团 / 电子工业出版社 / 2015-9 / 65.00
React Native是当前移动端开发中的优秀解决方案。《React Native:用JavaScript开发移动应用》围绕着如何将一个完整App提交到App Store,讲解了使用React Native开发iOS应用所涉及的方方面面。首先介绍了Flexbox布局,教大家从零开始搭建一个初始应用,以此阐明React Native的基础运行机理;然后介绍了Flux的设计思想,怎么理解和使用Pro......一起来看看 《React Native:用JavaScript开发移动应用》 这本书的介绍吧!