3.7.6 - String Methods
来源:互联网 发布:网上开淘宝店流程 编辑:程序博客网 时间:2024/05/16 19:17
s = "Beginning Python for Maya"s.upper() # s is not changes.lower()s.isupper()s.islower()s.find("Python")s[10]s[10:17]number = "1"number.isdigit()s.isdigit()number.zfill(4)s.split(" ")
执行结果如下:
s = "Beginning Python for Maya"
s.upper() # s is not change
// Result: BEGINNING PYTHON FOR MAYA //
s.lower()
// Result: beginning python for maya //
s.isupper()
// Result: False //
s.islower()
// Result: False //
s.find("Python")
// Result: 10 //
s[10]
// Result: P //
s[10:17]
// Result: Python //
number = "1"
number.isdigit()
// Result: True //
s.isdigit()
// Result: False //
number.zfill(4)
// Result: 0001 //
s.split(" ")
// Result: ['Beginning', 'Python', 'for', 'Maya'] //
import ospaths = os.environ["MAYA_SCRIPT_PATH"]paths = paths.split(";")for p in paths: print(p)
0 0
- 3.7.6 - String Methods
- Common JS String Methods
- [Javascript String Math] String Methods, eval(), Math Methods
- python string methods 和 string module区别
- String object's properties and methods
- String的常用pre-defined methods
- 17.5.6 Abstract methods
- 17.5.6 Abstract methods
- Chapter 6:Kernel Methods
- METHODS
- Methods
- Methods
- String searches: Like operator, regular expressions, and System.Char methods
- 6 Methods For Vertical Centering With CSS
- Java学习笔记(6)Methods
- Kernel Methods (6) The Representer Theorem
- CFA(4) Quantitative Methods CFA(5) CFA(6)
- Swift 易忽略的笔记 6):Methods & Subscripts
- 插入排序算法中的直接插入法和希尔排序
- 硬币找零问题(Java)
- 3.7.5 - Modifying Strings
- 黑马程序员——Java基础语法——数组和循环嵌套
- JAVA 的 SHA-256 和 SHA-512 两种 Hash 算法的调用
- 3.7.6 - String Methods
- 工厂模式
- uboot - 主Makefile分析【3】
- 3.7.7 - String Formatting
- 黑马程序员——Java基础——面向对象
- 3.8 - Using the Print Function
- Android-xml解析之PULL解析
- 3.9.1 - Lists in Python
- Struts2中Action的属性接收参数