0
What's the point of creating an empty list?
3 Antworten
+ 3
simple. for future uses within functions.
+ 2
it is a good programming prctice to initialize your variables before using them (this rule applies for languages like C and C++). However, in case of python the variable has four attributes (value, type, id, name) and all gets assigned in the declaration statement, but you may want to start with an empty list and append elements to it later or make it as a placeholder that helps you to remember that you want a list
+ 1
you can save something with it,such as the answer you got.