先来一段代码:squares = [] for i in range(1, n+1): squares.append(i*i)这是非常常见的一种通过append方法逐个增加元素创建列表的场景,而且通常我们可以理解为上述 ...
確定! 回上一頁