python日积月累之ljust()
2015-09-16 14:22
603 查看
Python ljust() 方法返回一个原字符串左对齐,并使用空格填充至指定长度的新字符串。如果指定的长度小于原字符串的长度则返回原字符串。
<span style="font-size:18px;">str = "I LOVE YOU"; print str.ljust(50, '0');</span>
相关文章推荐
- python bz2模块
- python日积月累之join()
- python 进程间通信
- python日积月累之isspace()
- [python] 0x3 Python Tutorial: Fuzzer
- selenium-webdriver(python) (十六) --unittest 框架
- selenium-webdriver(python) (十五) -- 鼠标事件
- selenium-webdriver(python) (十四) -- webdriver原理
- selenium-webdriver(python) (十三) -- cookie处理
- 轻松自动化---selenium-webdriver(python) (十二)
- python pip安装 PIL
- 轻松自动化---selenium-webdriver(python) (十一)
- 轻松自动化---selenium-webdriver(python) (十)
- python日积月累之isnumeric()
- 轻松自动化---selenium-webdriver(python) (八)
- 轻松自动化---selenium-webdriver(python) (七)
- 轻松自动化---selenium-webdriver(python) (六)
- 轻松自动化---selenium-webdriver(python) (五)
- 轻松自动化---selenium-webdriver(python) (三)
- 深入了解一下PYTHON中关于SOCKETSERVER的模块-D