I am a beginner programmer, while doing some work in Python 2.7, I ran into an issue I can't seem to pass. I am trying to find all permutations of all pairs of digits; out of an array that has 4 digits. Example: array = ["a", "b", "c", "d"] and I would like to see the permutations like this: ab, ac, ad, ba, cd, da... ect... Here is my code so far, I can't figure out the next step:
from itertools import permutations
array = ["a", "b", "c", "d"]
for p in permutations(array):
print(p)
I would appreciate any help I can get, thank you.