Mar-01-2019, 05:46 AM
permutations returns a generator, which is an object that just sits there and generates values until it's done. Once it's done, that's it, it's dead. You can't get anything else out of it. A file object works the same way. You can only read through a file object once, and then it doesn't return anything when you try to read from it.
Note that once you have done list() on the value returned from permutations, you have all the data in the list. You use that instead.
Note that once you have done list() on the value returned from permutations, you have all the data in the list. You use that instead.
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