Back
Syntax
Study
Editor
Mode:
HTML
CSS
JavaScript
PHP
Reset
Run »
HTML / CSS / JS
from itertools import combinations, permutations print(list(combinations("ABC", 2))) # [("A","B"), ("A","C"), ("B","C")] print(list(permutations("AB", 2))) # [("A","B"), ("B","A")]
Result
Open