Guest User

Untitled

a guest
Jun 20th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. from itertools import permutations, combinations
  2.  
  3. elementos = ['Python', 'PyCharm', 'Programming']
  4.  
  5. # Permutaciones:
  6. print('Permutaciones:')
  7. for p in permutations(elementos):
  8. print(p)
  9.  
  10. # Combinaciones:
  11. print('\nCombinaciones:')
  12. for c in combinations(elementos, 2):
  13. print(c)
Add Comment
Please, Sign In to add comment