Python 混淆知识点集合
2014-12-25 22:00
375 查看
1,字符串和列表的更新异同:
(1)均可更新
(2)It's important to remember that lists are mutable (changeable) in Python,
but strings aren't; when you slice a string, you get back a new string. The original string is unchanged
unless you purposely "save over" it, like this:
(1)均可更新
(2)It's important to remember that lists are mutable (changeable) in Python,
but strings aren't; when you slice a string, you get back a new string. The original string is unchanged
unless you purposely "save over" it, like this:
my_string = "Monty Python" # => Monty Python my_string = my_string[:-7] # => Monty
相关文章推荐
- 基于java集合中的一些易混淆的知识点(详解)
- Python入门---易错已错易混淆----知识点
- python集合的知识点
- Python中几个容易混淆的概念:列表、元组、字典、集合
- python知识点: 列表解析/字典解析/集合解析/生成器解析
- java集合中的一些易混淆的知识点
- Python的易混淆知识点
- C#知识点之集合
- Python中的集合
- 集合类之ArrayList类知识点和思考练习
- Python学习知识点
- NMEA PYthon代码集合
- Python 关于集合的方法函数和相关模块(利于做排重)
- javascript全面总结(可能别人看的有点乱,不过多看几遍就习惯了,每个*是一个知识点集合)
- 集合类之Hashtable类知识点和思考练习
- Python多线程知识点
- python 集合运算
- [Python]RSS处理资源集合
- [Python]RSS处理资源集合
- C#知识点之集合