To create an empty list in Python with certain size, we can create a list with all None
with the given size.
For instance, we write
l = [None] * 10
to create list l
of size 10 that has all None
‘s inside.
To create an empty list in Python with certain size, we can create a list with all None
with the given size.
For instance, we write
l = [None] * 10
to create list l
of size 10 that has all None
‘s inside.