noopy via Tutor <tutor@python.org> writes: > But when "for cc in permutations([])" yields an empty list, why does > "for cc in permutations("Z")" then actually have an item so that > "yield [items[i]]+cc" will be executed?
Does this help:: >>> i = 1 >>> "Z"[:i] + "Z"[i+1:] 'Z' Can you explain why that would be the case? -- \ “I think a good gift for the President would be a chocolate | `\ revolver. And since he's so busy, you'd probably have to run up | _o__) to him real quick and hand it to him.” —Jack Handey | Ben Finney _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor