Jul-26-2018, 06:56 PM
(Jul-26-2018, 06:38 PM)jarrod0987 Wrote: I don't quite get the purpose of the start = [] and if not sequence return start (I do know what if not does and I think this has to do with when the sequence runs out of items?)
You build the sequences one item at a time. That is, one item each call of the function. Start is the sequence build so far. At the beginning, it hasn't built anything yet, so the default is to have it be empty. Note that when we make the recursive call, the second (start) parameter is start + [item].
Again, read up on recursion. That's what is going on in my example.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures