Mar-24-2021, 10:51 PM
i am looking for a permutation function (hoping i don't need to write one) that can take 3, 4, or 5 characters i give (no duplicats) and produce all possible combinations in every order (abcdef',fedcba','bdfeac',...) meeting these requirements:
1. no duplication of any letter.
2. every possible length from 1 to N. N is the number of different characters given.
3. every possible order
a generator is fine and probably preferred. i don't see anything in itertools that does this.
1. no duplication of any letter.
2. every possible length from 1 to N. N is the number of different characters given.
3. every possible order
a generator is fine and probably preferred. i don't see anything in itertools that does this.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.