•        Python : 3.7.0
  •          OS : Ubuntu 18.04.1 LTS
  •         IDE : PyCharm 2018.2.4
  •       Conda : 4.5.11
  •    typesetting : Markdown

code

coder@Ubuntu:~$ source activate py37
(py37) coder@Ubuntu:~$ ipython
Python 3.7.0 (default, Jun 28 2018, 13:15:42)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.5.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: my_str = ' hello WORLD' In [2]: my_str
Out[2]: ' hello WORLD' In [3]: my_str.lstrip()
Out[3]: 'hello WORLD' In [4]: exit
(py37) coder@Ubuntu:~$ source deactivate
coder@Ubuntu:~$

resource

  • [文档] docs.python.org/3
  • [规范] www.python.org/dev/peps/pep-0008
  • [规范] zh-google-styleguide.readthedocs.io/en/latest/google-python-styleguide/python_language_rules
  • [源码] www.python.org/downloads/source
  • [ PEP ] www.python.org/dev/peps
  • [平台] www.cnblogs.com
  • [平台] gitee.com


Python具有开源、跨平台、解释型、交互式等特性,值得学习。

Python的设计哲学:优雅,明确,简单。提倡用一种方法,最好是只有一种方法来做一件事。

代码的书写要遵守规范,这样有助于沟通和理解。

每种语言都有独特的思想,初学者需要转变思维、踏实践行、坚持积累。

Python3基础 str lstrip 去掉字符串左边的空格的更多相关文章

  1. SqlSever基础 ltrim函数 除去字符串左边的空格,右边的中间的不管

    镇场诗:---大梦谁觉,水月中建博客.百千磨难,才知世事无常.---今持佛语,技术无量愿学.愿尽所学,铸一良心博客.------------------------------------------ ...

  2. Python3基础 str 通过拆分字符串与插入新的内容形成新的字符串

             Python : 3.7.0          OS : Ubuntu 18.04.1 LTS         IDE : PyCharm 2018.2.4       Conda ...

  3. Python3基础 str for 输出字符串中的每个字符

             Python : 3.7.0          OS : Ubuntu 18.04.1 LTS         IDE : PyCharm 2018.2.4       Conda ...

  4. Python3基础 str """ 多行字符串

             Python : 3.7.0          OS : Ubuntu 18.04.1 LTS         IDE : PyCharm 2018.2.4       Conda ...

  5. Python3基础之数据类型(字符串和列表)

    1.Python字符串方法 1.1.如何在Python中使用字符串 a.使用单引号(') 用单引号括起来表示字符串,例如: str1="this is string"; print ...

  6. C++去掉字符串中首尾空格和所有空格

    c++去掉首尾空格是参考一篇文章的,但是忘记文章出处了,就略过吧. 去掉首尾空格的代码如下: void trim(string &s) { if( !s.empty() ) { s.erase ...

  7. as3中去掉字符串两边的空格,换行符

     as3 去掉字符串两边的空格,换行符,方法一  ActionScript Code  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20   pub ...

  8. C++去掉字符串首尾的 空格 换行 回车

    /* *去掉字符串首尾的 \x20 \r \n 字符 */ void TrimSpace(char* str) { ; char *end = str; char *p = str; while(*p ...

  9. C++ 去掉字符串的首尾空格和全部空格

    #include <iostream>#include <string>using namespace std; //去掉收尾空格string& ClearHeadTa ...

随机推荐

  1. LeetCode 第 342 题(Power of Four)

    LeetCode 第 342 题(Power of Four) Given an integer (signed 32 bits), write a function to check whether ...

  2. Html各组件MIME类型

    扩展名 类型/子类型 * application/octet-stream 323 text/h323 acx application/internet-property-stream ai appl ...

  3. idea 使用方法

    1:设置自定义自动补全,使用$END$代表最后光标所在的位置. http://blog.csdn.net/u012569796/article/details/54694418 2:使用 shift+ ...

  4. [vue]spa单页开发及vue-router基础

    - 了解spa页面跳转方式:(2种) spa: 单页跳转方式 开发(hash模式): https://www.baidu.com/#2313213 生产(h5利于seo): history.pushS ...

  5. 飞跃平野(sdut1124)

    http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=1124 飞跃原野 Time Limit: 500 ...

  6. pandas.drop/isnull/fillna/astype的用法

    删除表中的某一行或者某一列更明智的方法是使用drop,它不改变原有的df中的数据,而是返回另一个dataframe来存放删除后的数据. (1)清理无效数据 df[df.isnull()] #返回的是个 ...

  7. 为什么size_t重要?

    参见 http://en.cppreference.com/w/cpp/types/size_t size_t其实与uintptr_t一个道理.就是一个东西.指针其实就是寻址,与地址总线位数一致,编译 ...

  8. 微信小程序- wx.request请求不到数据

    小程序官方文档手册 https://mp.weixin.qq.com/debug/wxadoc/dev/ 小程序开发问答社区 http://www.henkuai.com/forum.php wx.r ...

  9. 025-du命令查看文件大小

    1.查看某个目录下面所有文件占用空间大小并排序.du -sh  目录 2.排序.sort -h

  10. APB总线

    APB(Advance Peripheral Bus)是AMBA总线的一部分,从1998年第一版至今共有3个版本. AMBA 2 APB Specfication:定义最基本的信号interface, ...