parent
3ef372196c
commit
ce93705233
|
@ -228,6 +228,7 @@ print(list1)
|
|||
我们还可以使用列表的生成式语法来创建列表,代码如下所示。
|
||||
|
||||
```Python
|
||||
import sys
|
||||
f = [x for x in range(1, 10)]
|
||||
print(f)
|
||||
f = [x + y for x in 'ABCDE' for y in '1234567']
|
||||
|
|
Loading…
Reference in New Issue