python initialize list length n

54

python initialize list length n -

Creating an empty list:

>>> l = [None] * 10
>>> l
[None, None, None, None, None, None, None, None, None, None]

Comments

Submit
0 Comments