python 中的lstrip()方法
用于去掉一个指定字符串中的某个字符实例以下实例展示了lstrip()的使用方法:#!/usr/bin/pythonstr = "this is string example....wow!!!";print str.lstrip();str = "88888888this is string example....wow!!!8888888";print..
·
用于去掉一个指定字符串中的某个字符
实例
以下实例展示了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
更多推荐
已为社区贡献2条内容
所有评论(0)