Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from itertools import permutations, combinations
- elementos = ['Python', 'PyCharm', 'Programming']
- # Permutaciones:
- print('Permutaciones:')
- for p in permutations(elementos):
- print(p)
- # Combinaciones:
- print('\nCombinaciones:')
- for c in combinations(elementos, 2):
- print(c)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement