标签: python
我对这种语法感到困惑。它还是一个清单吗?为什么要在列表中添加for语句? The code comes from here
答案 0 :(得分:0)
这是一种动态生成列表的方法,称为列表理解。
https://docs.python.org/2/tutorial/datastructures.html#list-comprehensions