Jul-15-2019, 08:40 AM
The first one is better, because lesser code in function signature.
Additionally you have the reference to the list.
This can help you, if you have more than one function, which needs the list.
Then you can reuse the list in other function calls, but if you change the
list, everything is affected. This is why it's a bad idea to mutate a list
in a function.
Additionally you have the reference to the list.
This can help you, if you have more than one function, which needs the list.
Then you can reuse the list in other function calls, but if you change the
list, everything is affected. This is why it's a bad idea to mutate a list
in a function.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!