0
list
What does list[None]*5 means
2 Answers
+ 4
The way you wrote it in your question:
list[None]*5
is not valid.
But you can define a list like this:
mylist = [None]*5
It is the same as adding 5 lists, each containing the value None.
mylist = [None] + [None] + [None] + [None] + [None]
Ultimately the result will be:
mylist = [None, None, None, None, None]
+ 2
Here are two references in regards to None
It is like NIL or NULL in other languages.
https://stackoverflow.com/a/36928646/7218253
https://docs.python.org/2/library/constants.html#None