方括号运算符用来检索数组和集合的元素。
The bracket operator is used to retrieve elements of arrays and collections.
和字符串不同的是,列表是可以修改的。方括号运算符放到一个赋值语句的等号左侧的时候,就会把对应位置的列表元素重新赋值。
Unlike strings, lists are mutable. When the bracket operator appears on the left side of an assignment, it identifies the element of the list that will be assigned.
最后,我们看到第二个子表达式,它除了有由方括号组成的“不引用”运算符外,还有一个加号。
Finally, we get the second child subexpression, which other than the "don't refer" operator consists of some stuff in square brackets, and a plus sign.
最后,我们看到第二个子表达式,它除了有由方括号组成的“不引用”运算符外,还有一个加号。
Finally, we get the second child subexpression, which other than the "don't refer" operator consists of some stuff in square brackets, and a plus sign.
应用推荐