It looks like the initial answers in fact created more confusion. Their initial understanding of the for loop and how it calculates the result were correct. And also was corect their understanding why the second example (the print) was failing. IMHO the reason for initial confusion of OP is the fact that asterisk is used both as multiplication operator and also to handle variable number of positional arguments
@allusernamestaken, when you use *args (here args is used by convention) it handles variable number of positional arguments. The same way if you use something like **kwargs, it will handle variable number of keyword arguments
also asterisk may be used similarly for extended iterable unpacking
@allusernamestaken, when you use *args (here args is used by convention) it handles variable number of positional arguments. The same way if you use something like **kwargs, it will handle variable number of keyword arguments
also asterisk may be used similarly for extended iterable unpacking
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs