第一个原子是运算符,列表中其余的原子是参数。
The first atom is the operator, and the rest of the atoms in the list are the arguments.
Python中位运算的完整列表如表4所示。
The complete list of bit operations in Python is presented in Table 4.
列表中另一个常用的运算是过滤:根据某些用户定义的条件过滤列表中的项以创建一个较小的列表。
Another common operation on lists is filtering: creating a smaller list by filtering items in a list based on some user-defined criteria. Filtering is illustrated in Figure 5.
在这种情况下,fold运算指的是结合列表每个元素与下一个元素的转换,为整个列表提供一个累计的结果。
In this case, the fold operation refers to a transformation that combines each element of the list with the next one, accumulating a single result for the entire list.
您还可以使用重复运算符,可以将该运算符识别为乘法运算符,以便从小片段中构建更大的列表。
You can also use the repeat operator, which you may recognize as the multiplication operator, to build up a bigger list from small segments.
可用的运算符列表随即显示出来。
对于Where运算符,从可用筛选器的列表中选择afterBuy。
For the Where operator, select After Buy from the list of available filters.
迭代器:迭代一个序列的对象,这种序列不能提供列表的运算和方法。
An object that can iterate through a sequence, but which does not provide list operators and methods.
请选择一个此规则的运算符。根据您在上一节中所选的操作数,可用运算符的列表将发生更改。
Select an operator for this rule. The list of available operators will change depending on the operand you selected in the previous section.
另外一种常见运算是从列表中选取一些元素,然后返回一个次级列表。
Another common operation is to select some of the elements from a list and return a sublist.
此外还有一个非常有用的功能:可变长度的列表,聚集和分散运算符。
I also present a useful feature for variable-length argument lists, the gather and scatter operators.
和字符串不同的是,列表是可以修改的。方括号运算符放到一个赋值语句的等号左侧的时候,就会把对应位置的列表元素重新赋值。
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.
加号+运算符创建了新的列表,并不修改源列表。
The + operator creates a new list and leaves the original list unchanged.
一定要区分修改列表的运算和产生新列表的运算,这特别重要。
It is important to distinguish between operations that modify lists and operations that create new lists.
根据您在上一节中所选的操作数,可用运算符的列表将发生更改。
The list of available operators will change depending on the operand you selected in the previous section.
在使用列表的方法和运算符之前,你应该好好读一下文档,然后在交互模式里面对它们进行一下测试。
Before using list methods and operators, you should read the documentation carefully and then test them in interactive mode.
在使用列表的方法和运算符之前,你应该好好读一下文档,然后在交互模式里面对它们进行一下测试。
Before using list methods and operators, you should read the documentation carefully and then test them in interactive mode.
应用推荐