Python инициализировать длину списка N n
Creating an empty list:
>>> l = [None] * 10
>>> l
[None, None, None, None, None, None, None, None, None, None]
Dentedghost
Creating an empty list:
>>> l = [None] * 10
>>> l
[None, None, None, None, None, None, None, None, None, None]
arr = []
for i in range(n):
arr.append(x)
li = [None] * 5 # [None, None, None, None, None]
li = [0] * 5 # [0, 0, 0, 0, 0]