You aren't limited to passing a sequence directly into the constructor; you can also pass a variable that holds a tuple or a string into the list constructor.
您不仅能够将序列直接传递给构造函数,还可以将拥有元组或字符串的变量传递给 list 构造函数。
2
You can create a tuple by simply assigning a sequence of objects, separated by commas, to a variable (see Listing 5).
您只需向变量分配一个用逗号分隔的对象序列,就可以创建一个tuple(参见清单5)。
3
Once the code has iterated over all the elements in the tuple, it enters the else clause of the for loop, which prints out the value of the count variable.