Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Calcular combinações possívels sem repetição e tendo ordem como sem importância
- import itertools
- my_list = ['A', 'B', 'C', 'D']
- all_combs = []
- for n in range(1, len(my_list)+1):
- all_combs.extend(itertools.combinations(my_list, n))
- for item in range(0, len(all_combs)):
- print(all_combs[item])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement