I am trying to make possible combinations of 'AB', like:
[('A', 'A'), ('A', 'B'), ('B', 'A'), ('B', 'B')].
I'm using itertools.permutations, but its just returning, [('A', 'B'), ('B', 'A')]
What would be the procedure to have both ('A','A') and ('B','B') too.
Also, here I am talking with input 'AB'. What would be the procedure if I had to make combinations of input 'AB', 'BA' such that the output is [('AB','AB'), ('AB, 'BA'), ('BA', 'BA'), ('BA','BA']).
Also, I don't worry about the order.